I want to know the difference between design pattern and enterprise design pattern e.g. some books call ActiveRecord an enterprise design pattern, while singleton is a design pattern.

- 24,161
- 21
- 159
- 240

- 26,690
- 50
- 155
- 234
-
7The GoF book retails for $59.99, while Martin Fowler's PoEAA book is $69.99. So the difference between design patterns and enterprise design patterns is ten bucks. :-) – Bill Karwin Sep 13 '10 at 20:44
-
@Bill Karwin good one :D – sameera207 Sep 14 '10 at 05:17
-
Related posts - [What's the difference between design patterns and architectural patterns?](https://stackoverflow.com/q/4243187/465053), [Software architecture design patterns](https://stackoverflow.com/q/4192887/465053) – RBT Apr 09 '18 at 08:41
3 Answers
It probably has the most to do with what book it came from. Singleton was first popularized in "Design Patterns" by the Gang of Four. ActiveRecord was in "Patterns of Enterprise Application Architecture", by Martin Fowler.
The Gang of Four described Design Patterns as generally useful object-oriented class structures.
Fowler's book is about how to access enterprise pieces (databases, messaging backbones, etc) in object-oriented code.

- 87,846
- 14
- 132
- 192
They both refer to design patterns, but at different levels of granularity.
As you have stated it, one could simply think of an enterprise design pattern as the design of the high level system components and how they work together across a distributed system for example, and a design pattern such as singleton to be at a code level of a particular component within the overall system.
But it may be more important to understand that a design pattern in a generic context, as Wikipedia does a good job of stating, "is a general reusable solution to a commonly occurring problem".
Enjoy!

- 5,268
- 24
- 31
Something that the consultants will charge an extra $80-$200/hr for.

- 15,620
- 5
- 37
- 62