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:33] – cyrille | informatique:design_pattern [05/09/2010 17:43] – cyrille | ||
---|---|---|---|
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... | ||
+ | |||
+ | http:// | ||
+ | |||
+ | The singleton pattern was described in the GoF Design Patterns | ||
+ | |||
+ | We claim that the GoF Singleton pattern is, in fact, quite often an anti-pattern. The downside of the singleton is that there are many transitive dependancies that are not easy to spot. Singletons cannot easily be replaced with Mock Objects for the sake of easy unit testing. | ||
+ | |||
+ | Voir: | ||
+ | * [[http:// | ||
+ | * [[http:// | ||
====Strategy ==== | ====Strategy ==== | ||
Ligne 297: | Ligne 317: | ||
{{: | {{: | ||
- | Adaptateur avec héritage : | + | Adaptateur avec héritage: |
{{: | {{: | ||
- | Adaptateur avec composition : | + | Adaptateur avec composition: |
{{: | {{: | ||
+ | Voir: | ||
+ | * [[http:// | ||
+ | * [[http:// | ||
==== Gateway ==== | ==== Gateway ==== | ||
Ligne 325: | Ligne 348: | ||
==== Value Object ==== | ==== Value Object ==== | ||
- | ==== Money ==== | + | |
- | ==== Special Case ==== | + | |
+ | |||
==== Plugin ==== | ==== Plugin ==== | ||
informatique/design_pattern.txt · Dernière modification : 03/03/2023 14:56 de cyrille