Definitions on this blog came from the book Head First Design Patterns.
- Strategy pattern - defines a family of algorithms, ancapsulate each one, and makes them interchangeable. Strategy lets the algorithm vary independently from clients that use it.
- Observer pattern - defines a one-to-many dependency between objects so that when one object changes state, all its dependents are notified and updated automatically.
- think Swing/GUI
Using Java's built-in Observer pattern (allows observer to pull data from observable)...
- Decorator pattern - attach additional responsibilities to an object dynamically. Decorators provide a flexible alternative to subclassing for extending functionality.
- think Java I/O
Ref:
Head First Design Patterns by By Eric Freeman, Elisabeth Robson, Kathy Sierra, and Bert Bates
No comments:
Post a Comment