The pattern in the project design process is used to identify the various common types of problems and also provides the solutions structures that are best to solve the problems, the patterns do not deal with certain specified problems but instead they deals with the general types of problems.
In the AIM individual project there are two major patterns learnt that I found essential to be applied in the project, among the two patterns includes the observer pattern and the singleton pattern.
The design patterns has a specific pattern where they have the Intent, Problem descriptions, the Contexts, Forces, the Solution, the Sketch and the resulting Contexts as shown below.
Name |
Observer pattern |
Intent |
It defines the one-to-many dependencies between the objects such that while one objects state change all its dependents automatically get notifications and updates. |
Problem Description |
How the states are maintained in a consistent manner between the disparate and independent parts of the software application? |
Context |
In case there are two parts that relates to each other and one of the part is dependent of the other part. The two parts encapsulation in separate objects enables one to do modification and re-use those objects independently. In case one wants a simple interface to allow the object to notify wide variety of other objects with a loose coupling. In case one is changing object that requires another object and one do not know number of other objects that require to be changed. |
Forces |
The increase in coupling enable one object to know the time any other object changes the states. As a result of increased coupling the software design becomes rigid and hard to modify and less usable. The various dependent objects require knowing the other object’s internal structures and therefore in case the structures change the various dependent objects require also changing. In case there are different type of the dependent objects the strong dependencies becomes expensive in their maintenance. |
Solution |
The complex dependencies are solved through the definition of two abstract classes which provides simplified interfaces between the publishers and the subscribers. The two classes represent the subjects and the observers where the subjects know their respective observers and also might have instances of the dependent observers. The subjects provide the interfaces that attach and detach the observer objects. The observers on the other side define the interface that subject the user to give notification to the observers that the subject has changed. |
Sketch |
|
Name |
Flyweight pattern |
Intent |
It is designed to allow the sharing that supports large number of objects which has parts of the internal states which are common while the other parts of state varies. |
Problem Description |
How some of the objects internal states become common while the other object’s state varies in the program? |
Context |
In case one wants to declare the interfaces through which the flyweight can receive and acts on extrinsic states. The flyweight interfaces are implemented and the intrinsic states are stored. In case one want to create and manage the flyweight objects where the factory enables the sharing of the flyweight objects ,however the factory will be used to maintain the pools various flyweights objects and also return the object from the pool in case it already exist. In case the clients want to maintain the reference to the flyweight in addition to computing and maintenance of extrinsic states. |
Forces |
The users requires the flying weight objects and the factory is responsible of calling the flyweight objects .The factory in this case check the pool of the flyweight in order to determine the in case the requested flyweight object is present in the object pool and in case the object is available its reference is returned to the factory, however when the object is not available then the factory create a flyweight of the requested object types ,then add it to the objects pools and then return references to the flying weight. The flyweight then maintains intrinsic states and then provides a method that manipulates an external state. |
Solution |
The solution is obtained through the use of the object oriented text editor that creates the characters objects to represents the various characters that are found on the documents, this character object is able to maintain the information concerning the characters ,the documents tends to have large number of characters requires large memory where the character’s number is known and is fixed and therefore the creation of the flyweight for the letter clients the editor memory requirement is reduced drastically. |
Sketch |
|
(Karumanchi, 2012).
The above two design patterns are the selected patterns and they will be used to solve the various design problems as follows.
The two identified design patterns are applicable in the development of the identified AIM project in the following cases.
The selected design pattern is able to solve various design problems which are encountered by the system developers during the entire system development process which includes the following.
As a result of using the proposed pattern there are various positive results while developing the system which includes the following:
In the identified project the selected patterns will be used to solve the various identified problems above and below are the plans of using the patterns in the project.
The observer is planned by implementation of the UML class diagram as below using the following steps.
The flyweight is planned by implementation of the UML class diagram as below using the following steps.
Reference
Award,E.(2013) Systems Analysis and Design .3rd edn.Delhi:Galgotia Publications Pvt Ltd.
Gupta,B.(2015) Power System Analysis and Design.1st edn.New Delhi: S Chand & Company.
Goyal, A. (2011) systems Analysis and Design Paperback .2nd edn.INDIA:Prentice Hall India Learning Private Limited.
Karumanchi,N.(2012) Peeling Design Patterns: For Beginners and Interviews.5th edn.New York:CareerMonk Publications.
Essay Writing Service Features
Our Experience
No matter how complex your assignment is, we can find the right professional for your specific task. Contact Essay is an essay writing company that hires only the smartest minds to help you with your projects. Our expertise allows us to provide students with high-quality academic writing, editing & proofreading services.Free Features
Free revision policy
$10Free bibliography & reference
$8Free title page
$8Free formatting
$8How Our Essay Writing Service Works
First, you will need to complete an order form. It's not difficult but, in case there is anything you find not to be clear, you may always call us so that we can guide you through it. On the order form, you will need to include some basic information concerning your order: subject, topic, number of pages, etc. We also encourage our clients to upload any relevant information or sources that will help.
Complete the order formOnce we have all the information and instructions that we need, we select the most suitable writer for your assignment. While everything seems to be clear, the writer, who has complete knowledge of the subject, may need clarification from you. It is at that point that you would receive a call or email from us.
Writer’s assignmentAs soon as the writer has finished, it will be delivered both to the website and to your email address so that you will not miss it. If your deadline is close at hand, we will place a call to you to make sure that you receive the paper on time.
Completing the order and download