16
2010
Design Patterns : Chain of Responsibility
Motivation Object-oriented developers strive to keep object loosely coupled, keeping the responsibility between objects specific and minimal.. This leads to introduce a change easily with less risk of defects. Clients see only an object’s visible interface and remain isolated from the details of the object’s implementation. Intent Avoid coupling the sender of a request to its receiver by giving more than one object the chance to handle the request. To apply this pattern, chain [...]
14
2010
Design Patterns : Observer Pattern
Definition Define a one-to-many dependency between objects so that when one object changes state, all its dependents are notified and updated automatically. Applicability Use Observer pattern when An abstraction has two aspects, one dependent on the other. Encapsulating these aspects in separate objects let you vary and reuse them independently. A change to one object requires changing others, and you don’t know how many objects need to be changed. An object should be able to [...]
12
2010
Design Patterns : Factory Method
Motivation As a class developer, you will ordinarily provide class constructors to let users of your class instantiate it. However, a client that needs an object does not or should not know which of several possible classes to instantiate. Intent Define an interface for creating an object, but let subclasses decide which class to instantiate. Factory Method lets a class defer instantiation to subclasses. Applicability Use Factory Method pattern when • In order [...]
11
2010
Design Patterns : Decorator pattern
Intent Attach additional responsibilities to an object dynamically. Decorators provide a flexible alternative to sub-classing for extending functionality. [GoF, p175] Client-specified embellishment of a core object recursively wrapping it. Diagram Rules of thumb Adapter provides a different interface to its subject. Proxy provides the same interface. but the decorator provides an enhanced interface. [Gof, p216] Adopter changes an object’s interface, Decorator enhances an objects responsibilities, Decorator is thus more transparent to the client. [...]
10
2010
Design Patterns : Strategy pattern
Motivation There are situations where the classes differ only by their behaviour, and on such situations it is advisable to isolate the algorithms into separate classes in order to have the ability to select different algorithms at the runtime depending on the user needs/client inputs. Intent “Define a family of algorithms, encapsulate each one, and make them interchangeable. Strategy lets the algorithm vary independently from the clients that use it.” [Gamma, p315] Capture the [...]
Recent Posts
- How to populate a dropdown menu from database in CodeIgniter [Workaround]
- How to Overclock Samsung Galaxy Mini Upto 800MHz
- Current and Future Relavance of Business Excellence / Improvement to Argos UK Ltd. Possible Benefits and Likely Inhabitors Exists
- What can Harm Your Online Reputation?
- Does Race Matter in the Choice of Popular Music among Youngsters?
The Tutebox
- Accounting
- Android Tips
- Apps
- Business
- C / C++
- Computers
- Database
- Design Patterns
- E-Commerce
- Economics
- Electronics
- Entertainment
- Finance
- Functional Programming
- Games
- Hardware
- Health
- HRM
- International Business
- Internet
- iOS Tips
- JAVA
- Life Style
- Linux
- M-Commerce
- Management
- Marketing
- Mathematics
- Mobile
- MS Office
- Network
- PC
- Personal Development
- Photography
- PHP
- Physics
- Places
- Programming
- Science
- Software
- Statistics
- Tweaks
- Visual Studio
- Web Hosting
- Windows


An article by



