Braindump
Design Patterns Overview
Braindump.DesignPatternsOverview History
Hide minor edits - Show changes to output
January 12, 2010, at 03:38 PM
by
- Added lines 1-22:
!! Overview of Design Patterns
This is a short overview of design patterns. It's based on my experience from working through the book ''Head First Design Patterns'' published by O'Reilly (a [[RecommendedReadings|recommended reading]], by the way).
!!! Summaries
||!border=1
||! Pattern ||! Summary ||! Example in the book ||
||Abstract Factory ||Allows a client to ''create a family of objects'' without relying on an implementation. ||Ingredients factories ||
||Adapter ||Provides a ''different interface'' for another object. || ||
||Command ||A command object represents an ''order to be executed''. ||Remote control and its buttons ||
||Composite ||Allows clients to use ''collections of objects'' in the ''same way'' as ''single objects''. ||The different menus in a restaurant ||
||Decorator ||''Extends the behaviour'' of an existing object with new behaviour. ||Calculating the price of coffee specialities ||
||Facade ||Provides a ''simplified interface'' for another object or set of corresponding objects. ||Home cinema equipment ||
||Factory Method ||''Creating'' a concrete implementation is ''delegated to subclasses''. || ||
||Iterator ||Use a ''collection of objects'' without knowing the implementation of the collection. || ||
||Observer ||The observed ''subject notifies registered clients'' about changes. || ||
||Proxy ||Control access to another object. || ||
||Singleton ||Ensure that ''only one instance'' of a class exists. || ||
||State ||Change ''state based behaviour'' through delegation. || ||
||Strategy ||''Change behaviour'' through delegation. ||Ducks' flying and quacking ||
||Template Method ||''Steps of an algorithm'' are implemented by ''subclasses''. ||Brewing coffee and tea ||
This is a short overview of design patterns. It's based on my experience from working through the book ''Head First Design Patterns'' published by O'Reilly (a [[RecommendedReadings|recommended reading]], by the way).
!!! Summaries
||!border=1
||! Pattern ||! Summary ||! Example in the book ||
||Abstract Factory ||Allows a client to ''create a family of objects'' without relying on an implementation. ||Ingredients factories ||
||Adapter ||Provides a ''different interface'' for another object. || ||
||Command ||A command object represents an ''order to be executed''. ||Remote control and its buttons ||
||Composite ||Allows clients to use ''collections of objects'' in the ''same way'' as ''single objects''. ||The different menus in a restaurant ||
||Decorator ||''Extends the behaviour'' of an existing object with new behaviour. ||Calculating the price of coffee specialities ||
||Facade ||Provides a ''simplified interface'' for another object or set of corresponding objects. ||Home cinema equipment ||
||Factory Method ||''Creating'' a concrete implementation is ''delegated to subclasses''. || ||
||Iterator ||Use a ''collection of objects'' without knowing the implementation of the collection. || ||
||Observer ||The observed ''subject notifies registered clients'' about changes. || ||
||Proxy ||Control access to another object. || ||
||Singleton ||Ensure that ''only one instance'' of a class exists. || ||
||State ||Change ''state based behaviour'' through delegation. || ||
||Strategy ||''Change behaviour'' through delegation. ||Ducks' flying and quacking ||
||Template Method ||''Steps of an algorithm'' are implemented by ''subclasses''. ||Brewing coffee and tea ||