23
2010
Design Patterns : Flyweight pattern
Motivation There are cases in programming where it seems that you need to generate a very large number of small class instances to represent data. Sometimes you can greatly reduce the number of different classes that you need to instantiate if you can recognize that the instances are fundamentally the same except for a few parameters. Intent Use sharing to support large numbers of fine-grained objects efficiently. Applicability Use flyweight pattern when An application uses [...]
18
2010
Design Patterns : Singleton
Motivation It is important for some classes to have exactly one instance. As an example although there can be many printers in a system, there should be only one printer spooler. How do we ensure that a class has only one instance and that the instance is easily accessible within the network? Intent To ensure that a class has only one instance, and to provide a global point of access to it. Regardless of the [...]
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 [...]
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



