[Java Design Pattern] - Creational Patterns
Wednesday, April 4, 2018
Creational Patterns
- Deal with one of the most commonly performance taks in an OO application, the creation of object.
- Support a uniform, simple and controlled mechanism to create objects.
- Allow the encapsulation of the details about what classes are instantiated and how these instances are created.
- Encourage the use of interfaces, which reduces coupling.
1. Factory Method
Description: A client object does not know which class to instantiate, you can make use of the factory method to create a instance of an appropriate class from a class hierarchy or a family of related classes.
Ref: Factory Method
2. Singleton
Description:Sometimes, there may be a need to have one and only one instance of a given class druing the lifetime of an application.
Ref: Singletone
3. Abstract Factory
Description: updating...
Ref: updating...
4. Prototype
Description: updating...
Ref: updating...
5. Builder
Description: updating...
Ref: updating...
Description: A client object does not know which class to instantiate, you can make use of the factory method to create a instance of an appropriate class from a class hierarchy or a family of related classes.
Ref: Factory Method
2. Singleton
Description:Sometimes, there may be a need to have one and only one instance of a given class druing the lifetime of an application.
Ref: Singletone
3. Abstract Factory
Description: updating...
Ref: updating...
4. Prototype
Description: updating...
Ref: updating...
5. Builder
Description: updating...
Ref: updating...
Bài liên quan
Comments[ 0 ]
Post a Comment