开发者

How many non-GOF patterns can you name? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.

Want to improve this question? Update the question so it focuses on one problem only by editing this post.

开发者_运维问答

Closed 4 years ago.

Improve this question

How many design-patterns can you name that are not GOF patterns?

Do you have any web-link that lists those names?


The Wikipedia page is always a good place to start. The "In Design Patterns" column in the linked table tells you which patterns were in the GOF book, and which weren't.


For what its worth, Design Patterns on Wikipedia has a list of design patterns, including information on whether those patterns appear in the GOF book.

Off the top of my head, GOF excludes a whole category of design patterns related to concurrency, including double-checked locking, spin locking, and pretty much everything regarding pi calculus.

Additionally, some patterns seem to follow naturally from other programming paradigms:

  • There are lots of patterns in functional programming which don't appear in the GOF book. A frequently used design pattern involves the use of accumulator variables to transform non-tail recursive functions into tail-recursive functions. Additionally, the concept of a monad or what its used for would have been entirely alien to the original developers. Immutable objects are entirely absent from the GOF book.

  • Lisp's macro system could probably be considered a design pattern, or indicative of one.

  • I've never used a stack-based programming language, but I bet Forth programmers have plenty of tricks to get their algorithms to map cleanly to the stack.

  • In an abstract kind of way, you might consider the relationships between tables in a relational database schema a kind of design pattern: 1-to-many, many-to-one, many-to-many, one-to-one. More than that, there are predictable ways of modeling hierarchial data, and here's a fairly cookie-cutter way of modeling tagged unions in SQL.

  • etc.


there are only a few other oo design patterns. one is null object (i forget the other). these plus the 23 gof are sort of orthogonal and complete. there really are no more. everything else is mostly just a combination of these 25 or so.


The wikipedia list indicated by Brian is indeed rather comprehensive. I was surprised to find nether...

  • ... the now rather famous Dependency Injection pattern.
  • ... or Alex Martelli's Borg pattern (a nice alternative to singleton see this link; the idea is to share state rather than identity).
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜