Première page Précédent Suivant Dernière page Image
Les premiers schèmes fondamentaux
Interface
- Keep a class that uses data and services provided by instances of other classes independent of those classes by having it access those instances through an interface.
Immutable
- The Immutable pattern increases the robustness of objects that share references to the same object and reduces the overhead of concurrent access to an object. It accomplishes this by not allowing an object’s state information to change after it is constructed. The Immutable pattern also avoids the need to synchronize multiple threads of execution that share an object.
Singleton
- The Singleton pattern ensures that only one instance of a class is created. All objects that use an instance of that class use the same instance. You can use the Singleton pattern with many other patterns. In particular, it is often used with the Abstract Factory , Builder and Prototype patterns
Notes: