Design PatternsOptimizing OOPs Technology.Aman JainApplication Engineer,Meritech Software Pvt. Ltd.
Gang of Fouro Pattern-based design was introducedinto architecture and engineering inthe 1950so It wasnt until a group of ...
Gang of Fouro The gang of four (GoF) is:o Erich Gammao Richard Helmo Ralph Johnsono John Vlissideso They are the authors o...
Pattern??o A pattern is a recurring solution to astandard problem, in a context.o A pattern is a three-part rule, whichexp...
Design Pattern Advantageso Using patterns offers a few keyadvantages:o Facilitate a proven solutiono Provide a common voca...
Types of Patternso Creational patternso Deal with initializing and configuring classes andobjects.o Structural patternso D...
Creational Design Patternso Abstract Factoryo Factory for building related objectso Buildero Separates an object construct...
Structural Patternso Adaptero Match interfaces of different classes.o Bridgeo Separates an Object’s interface from itsimpl...
Structural Patterns(Cont.)o Flyweighto A fine-grained objects shared efficientlyo Proxyo An Object representing another Ob...
Behavioural Patternso Chain of Responsibilityo Passes a request between a chain of Objects.o Commando Encapsulate a comman...
Behavioural Patterns(Cont.)o Mementoo Capture and restores an object’s internal state.o Observero A way of notifying chang...
Behavioural Patterns(Cont.)o Visitoro Defines a new operation to a class withoutchange.
Design Pattern SpaceChain ofresponsibilityCommandIteratorMediatorMementoObserverStateStrategyVisitorAdapter(object)BridgeC...
Benefits of Design Patternso Design patterns enable large-scale reuse of softwarearchitectures and also helpdocument syste...
Drawbacks of Design Patternso Patterns do not lead to directcode reuse.o Patterns are deceptively simple.o Teams may suffe...
Suggestions for Effective Useo Do not recast everything as apatterno Instead, develop strategic domain patterns andreuse e...
Referenceso http://www.dofactory.com/o B. Cheng – Michigan StateUniversity.o http://www.dotnetiq.com/
Thank You!
Upcoming SlideShare
Loading in...5
×

Design patterns ppt

4,197

Published on

0 Comments
5 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
4,197
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
0
Comments
0
Likes
5
Embeds 0
No embeds

No notes for slide

Transcript of "Design patterns ppt"

  1. 1. Design PatternsOptimizing OOPs Technology.Aman JainApplication Engineer,Meritech Software Pvt. Ltd.
  2. 2. Gang of Fouro Pattern-based design was introducedinto architecture and engineering inthe 1950so It wasnt until a group of fourresearchers combined forces thatpattern-based design became well-known and commonplaceo This group was known as the gang of four (GoF)
  3. 3. Gang of Fouro The gang of four (GoF) is:o Erich Gammao Richard Helmo Ralph Johnsono John Vlissideso They are the authors of the famoustext "Design Patterns: Elements ofReusable Object-Oriented Software"
  4. 4. Pattern??o A pattern is a recurring solution to astandard problem, in a context.o A pattern is a three-part rule, whichexpresses a relation between acertain context, a problem, and asolution.
  5. 5. Design Pattern Advantageso Using patterns offers a few keyadvantages:o Facilitate a proven solutiono Provide a common vocabulary
  6. 6. Types of Patternso Creational patternso Deal with initializing and configuring classes andobjects.o Structural patternso Deal with decoupling interface andimplementation of classes and objectso Composition of classes or objectso Behavioural patternso Deal with dynamic interactions among societiesof classes and objects.o Distribute responsibility.
  7. 7. Creational Design Patternso Abstract Factoryo Factory for building related objectso Buildero Separates an object construction from itsrepresentation.o Factory Methodo Creates an instance of several derived classes.o Prototypeo Factory for cloning new instances from aprototype.o Singletono A class of which a single object can exist.
  8. 8. Structural Patternso Adaptero Match interfaces of different classes.o Bridgeo Separates an Object’s interface from itsimplementation.o Compositeo A tree structure of simple and composite objects.o Decoratoro Add responsibilities of Objects dynamically.o Facadeo A single class that represents the entiresubsystem.
  9. 9. Structural Patterns(Cont.)o Flyweighto A fine-grained objects shared efficientlyo Proxyo An Object representing another Object.
  10. 10. Behavioural Patternso Chain of Responsibilityo Passes a request between a chain of Objects.o Commando Encapsulate a command request as an object.o Iteratoro Elements of a collection are accessedsequentially.o Interpretero Language elements are included.o Mediatoro Defines simplified communication betweenclasses.
  11. 11. Behavioural Patterns(Cont.)o Mementoo Capture and restores an object’s internal state.o Observero A way of notifying change to a number ofclasses.o Stateo Alter an object’s behaviour when its statechanges.o Strategyo Encapsulates an algorithm inside a class.o Template Methodo Defer the exact steps of an algorithm to asubclass.
  12. 12. Behavioural Patterns(Cont.)o Visitoro Defines a new operation to a class withoutchange.
  13. 13. Design Pattern SpaceChain ofresponsibilityCommandIteratorMediatorMementoObserverStateStrategyVisitorAdapter(object)BridgeCompositeDecoratorFaçadeFlyweightProxyAbstractfactoryBuilderPrototypeSingletonObjectInterpreterTemplate methodAdapter(class)FactorymethodClassScopeBehaviouralStructuralCreationalPurpose
  14. 14. Benefits of Design Patternso Design patterns enable large-scale reuse of softwarearchitectures and also helpdocument systems.o Patterns help improve developercommunication.o Pattern names form a commonvocabulary.o Patterns help ease the transitionto Object Oriented technology.
  15. 15. Drawbacks of Design Patternso Patterns do not lead to directcode reuse.o Patterns are deceptively simple.o Teams may suffer from patternoverload.o Patterns are validated byexperience and discussion ratherthan by automated testing.o Integrating patterns is a human-intensive activity.
  16. 16. Suggestions for Effective Useo Do not recast everything as apatterno Instead, develop strategic domain patterns andreuse existing tactical patterns.o Clearly document when patternsapply and do not apply.o Directly involve pattern authorswith application developers anddomain experts.
  17. 17. Referenceso http://www.dofactory.com/o B. Cheng – Michigan StateUniversity.o http://www.dotnetiq.com/
  18. 18. Thank You!

×