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:25] – cyrille | informatique:design_pattern [05/09/2010 17:45] – cyrille | ||
---|---|---|---|
Ligne 7: | Ligne 7: | ||
Commencer par lire: | Commencer par lire: | ||
* [[http:// | * [[http:// | ||
- | * [[http://smeric.developpez.com/ | + | * [[http://rpouiller.developpez.com/tutoriel/java/design-patterns-gang-of-four/ |
+ | | ||
Sources : | Sources : | ||
* [[http:// | * [[http:// | ||
Ligne 16: | Ligne 16: | ||
* (en) http:// | * (en) http:// | ||
* [[http:// | * [[http:// | ||
+ | * [[http:// | ||
+ | * | ||
==== best-practice-software-engineering' | ==== best-practice-software-engineering' | ||
Ligne 179: | Ligne 180: | ||
From a layering point of view, the presenter class might be considered as belonging to the application layer in a multilayered architecture system with common layers but it can also be seen as a presenter layer of its own between the application layer and the user interface layer. | From a layering point of view, the presenter class might be considered as belonging to the application layer in a multilayered architecture system with common layers but it can also be seen as a presenter layer of its own between the application layer and the user interface layer. | ||
- | |||
- | ===== Distribution Patterns ===== | ||
- | ==== Remote Facade ==== | ||
- | ==== Data Transfer Object ==== | ||
- | |||
- | L'un des premiers gourous à avoir introduit le Design Pattern DTO (ou Value Object) est Martin Fowler. Ces derniers temps, avec l' | ||
- | |||
- | * http:// | ||
- | * [[http:// | ||
- | |||
Ligne 216: | 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:// | ||
====Strategy ==== | ====Strategy ==== | ||
Ligne 293: | Ligne 299: | ||
* 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 312: | Ligne 312: | ||
{{: | {{: | ||
- | 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 335: | Ligne 343: | ||
==== Value Object ==== | ==== Value Object ==== | ||
- | ==== Money ==== | + | |
- | ==== Special Case ==== | + | |
+ | |||
==== Plugin ==== | ==== Plugin ==== | ||
Ligne 402: | Ligne 412: | ||
===== Plus de pattern ===== | ===== Plus de pattern ===== | ||
+ | |||
+ | ===== Distribution Patterns ===== | ||
+ | ==== Remote Facade ==== | ||
+ | ==== Data Transfer Object ==== | ||
+ | |||
+ | L'un des premiers gourous à avoir introduit le Design Pattern DTO (ou Value Object) est Martin Fowler. Ces derniers temps, avec l' | ||
+ | |||
+ | * http:// | ||
+ | * [[http:// | ||
informatique/design_pattern.txt · Dernière modification : 03/03/2023 14:56 de cyrille