‍Changing in Design Pattern Catalog

  • یوسف مهرداد

Larry O’Brien recently interviewed three of the Gang of Four about their seminal work on patterns, “Design Patterns 15 Years Later: An Interview with Erich Gamma, Richard Helm, and Ralph Johnson“.

Larry: How would you refactor “Design Patterns”?
Erich: We did this exercise in 2005. Here are some notes from our session.
When discussing which patterns to drop, we found that we still love them all. (Not really—I’m in favor of dropping Singleton. Its use is almost always a design smell.)
So here are some of the changes:

* Interpreter and Flyweight should be moved into a separate category that we referred to as “Other/Compound” since they really are different beasts than the other patterns. Factory Method would be generalized to Factory.

* The categories are: Core, Creational, Peripheral and Other. The intent here is to emphasize the important patterns and to separate them from the less frequently used ones.

* The new members are: Null Object, Type Object, Dependency Injection, and Extension Object/Interface (see “Extension Object” in Pattern Languages of Program Design 3, Addison- Wesley, 1997).

These were the categories:

* Core: Composite, Strategy, State, Command, Iterator, Proxy, Template Method, Facade

* Creational: Factory, Prototype, Builder, Dependency Injection

* Peripheral: Abstract Factory, Visitor, Decorator, Mediator, Type Object, Null Object, Extension Object

* Other: Flyweight, Interpreter

As I said above these are just notes in a draft state. Doing a refactoring without test cases is always dangerous.

Quote: Theory is when you know something, but it doesn’t work.
Practice is when something works, but you don’t know why it works.
Programmers combine Theory and Practice: Nothing works and they
don’t know why.

https://bibalan.com/?p=338
یوسف مهرداد

یوسف مهرداد


کانال تلگرام

دیدگاهتان را بنویسید

نشانی ایمیل شما منتشر نخواهد شد. بخش‌های موردنیاز علامت‌گذاری شده‌اند *

برای خروج از جستجو کلید ESC را بفشارید