摘要:
The Singleton Patternensures a class has only one instance, and provide a global point of access to it. 阅读全文
摘要:
The Singleton Patternensures a class has only one instance, and provide a global point of access to it. 阅读全文
摘要:
The Abstract Factory Pattern provides an interface for creating families of related or dependent objects without specifying their concrete classes.implementation 阅读全文
摘要:
The Factory Method Pattern defines an interface for creating an object, but lets subclasses decide which class to instantiate. Factory Method lets a class defer instantiation to subclasses.implementation 阅读全文
摘要:
The Decorator Pattern attaches additional responsibilities to an object dynamically. Decorators provide a flexible alternative to subclassing for extendingfunctionality.implementation 阅读全文
摘要:
The Observer Pattern defines a one-to-many dependency between objects so that when one object changes state, all of its dependents are notified and updated automatically. Observer Pattern = Publisher + Subcribersimplemenation: 阅读全文
|