informatique:design_pattern
Différences
Ci-dessous, les différences entre deux révisions de la page.
Les deux révisions précédentesRévision précédenteProchaine révision | Révision précédenteProchaine révisionLes deux révisions suivantes | ||
informatique:design_pattern [05/09/2010 17:27] – cyrille | informatique:design_pattern [19/01/2015 19:13] – [best-practice-software-engineering's Patterns map] cyrille | ||
---|---|---|---|
Ligne 28: | Ligne 28: | ||
* Delegation | * Delegation | ||
* Architectural Patterns express a fundamental structural organization or schema for software systems. They provide a set of predefined subsystems, specify their responsibilities, | * Architectural Patterns express a fundamental structural organization or schema for software systems. They provide a set of predefined subsystems, specify their responsibilities, | ||
- | * Model View Controller (MVC) | + | * [[# |
- | * Dependency Injection | + | * [[# |
* Structural Design Patterns are concerned with how classes and objects are composed together to form larger structures. [GoF, " | * Structural Design Patterns are concerned with how classes and objects are composed together to form larger structures. [GoF, " | ||
- | * Facade | + | * [[#facade|Facade]] |
* Decorator | * Decorator | ||
* Proxy | * Proxy | ||
- | * Data Access Object | + | * Data Access Object |
- | * Transfer Object | + | * [[# |
* Creational Design Patterns abstract the instantiation process. They help make a system independent of how its objects are created, composed, and represented. [GoF, " | * Creational Design Patterns abstract the instantiation process. They help make a system independent of how its objects are created, composed, and represented. [GoF, " | ||
- | * Factory Method | + | * [[# |
- | * Abstract Factory | + | * [[# |
* Objectpool | * Objectpool | ||
- | * Singleton | + | * [[# |
* Behavioral Design Patterns are concerned with algorithms and the assignment of responsibilities between objects. [GoF, " | * Behavioral Design Patterns are concerned with algorithms and the assignment of responsibilities between objects. [GoF, " | ||
* Iterator | * Iterator | ||
- | * Observer | + | * [[# |
* Event Listener | * Event Listener | ||
- | * Strategy | + | * [[# |
The diagram below shows the relationships between the patterns described in [[http:// | The diagram below shows the relationships between the patterns described in [[http:// | ||
Ligne 207: | Ligne 207: | ||
{{: | {{: | ||
+ | |||
+ | |||
+ | ==== Singleton ==== | ||
+ | |||
+ | * Restreindre le nombre d' | ||
+ | * Fournir une méthode pour accéder à cette instance unique. | ||
+ | |||
+ | Singleton doit restreindre le nombre de ses propres instances à une et une seule. Son constructeur est privé : cela empêche les autres classes de l' | ||
+ | |||
+ | Le singleton est souvent vu comme un anti-pattern car il amène des dépendances un peu partout et qu'il n'est pas facilement remplaçable pas des objets bidons (Mock object). | ||
+ | |||
+ | Voir: | ||
+ | * [[http:// | ||
+ | * [[http:// | ||
+ | * [[http:// | ||
+ | * [[http:// | ||
====Strategy ==== | ====Strategy ==== | ||
Ligne 284: | Ligne 300: | ||
* http:// | * http:// | ||
- | ==== Interface | + | ==== Adapter |
Synonymes: Encapsulateur, | Synonymes: Encapsulateur, | ||
- | An interface defines the signature operations of an entity, it also sets the communication boundary between two entities, in this case two pieces of software. It generally refers to an abstraction that an asset provides of itself to the outside. | + | L' |
- | Use an interface when: | + | |
- | | + | * Permettre à des classes de fonctionner ensemble, ce qui n' |
- | * you have to switch the implementation of a module during run-time | + | |
- | * at design-time you don't yet know which implementation you will use at compile-time | + | |
- | + | ||
- | Related Patterns: | + | |
- | * Many other patterns use interfaces, a lot of them depend on the interface | + | |
- | * It is possible | + | |
Pour des raisons de conformité à une norme, pour ne pas dépendre d'une implémentation, | Pour des raisons de conformité à une norme, pour ne pas dépendre d'une implémentation, | ||
Ligne 303: | Ligne 313: | ||
{{: | {{: | ||
- | Such a construction of using an interface is often combined with the [[#Factory|Factory-Pattern]] to retrieve the Implementation of the interface. | + | Adaptateur avec héritage: \\ |
+ | {{: | ||
+ | |||
+ | Adaptateur avec composition: | ||
+ | {{: | ||
+ | |||
+ | Voir: | ||
+ | * [[http:// | ||
+ | * [[http:// | ||
==== Gateway ==== | ==== Gateway ==== | ||
Ligne 326: | Ligne 344: | ||
==== Value Object ==== | ==== Value Object ==== | ||
- | ==== Money ==== | + | |
- | ==== Special Case ==== | + | |
+ | |||
==== Plugin ==== | ==== Plugin ==== | ||
informatique/design_pattern.txt · Dernière modification : 03/03/2023 14:56 de cyrille