views:

171

answers:

6

Optional assignment for one of my classes. 30-45 minute presentation/case study on either of these two topics:

  1. Examples of currently existing design patterns in real life projects: what problem they solve, why are they better than other techniques, etc
  2. New design patterns, what problems they solve that other design patterns can't, etc

Note that "new" and "existing" are with respect to the GoF book and the design patterns listed within.

For the first one, source code is not required, but it's probably a plus, so an open source project would be the best.

For the second, I'd basically need to be able to give a description like the ones in the GoF book for each pattern, with proper motivations, examples, and the like.

Anyone got some good ideas/pointers?

+1  A: 

You could start out by reading some of the other patterns books out there:

Mark Seemann
Although good advice, this might be a bit expensive for the ultimate goal of a presentation. On another note, do you know if those books are similarly (to GoF) easy to use as reference material (pattern dictionary).
NomeN
A: 
  1. The SVN project is a very good example of client/server pattern, although this is more of an architectural pattern than a design pattern per se, you might find it useful (and it's open source).

    Take a look at the design document, and very informative big picture.

  2. The visitor pattern is used extensively within Eclipse. Look at GEF/Draw2D (Layout) or JDT (Core) for some examples. (Again both are open source.)

Actually if you check out the code of either Draw2D or Eclipse, you'll notice a whole slew of design patterns that are used. Factories, Composites, Command, Memento (and Model-View-Controller but that's architectural again). Just grab a project and look for them, look for some pointers of where to look in the documentation.

NomeN
A: 

There are a ton of design pattern wiki type sites - To name a few:

As far as a extremely obvious pattern Model-View-Controller is used in MANY applications, and wasn't in the original GoF book on the topic. Although as NomeN mentions in the comments, its more of an architectural design pattern, it might be worth a mention in a presentation on the topic of design patterns.

The Null Object Pattern is another common one, jQuery uses it. An empty object (which still has all the normal functions) is returned instead of 'null' when you don't match anything with its main selector function.

gnarf
MvC like client-server and more general layered architecture are architectural patterns, not the more lower level design patterns, that's the reason they didn't occur in GoF. The teacher may be a hard-ass about the difference, although he may let it slide if the OP points this out in his presentation.
NomeN
A: 

The 'which new design patterns exists' part of your question is difficult to answer since:

  • there exists new implementations of the design patterns that are listed in the GoF book in some languages. For instance, the observer pattern can be written in .NET using delegates.

  • there exists different types / kinds of design patters, depending on the layer in which they're applied. For instance the 'Repository Pattern'.
    This is a pattern which does not belong in the GoF book for instance, because it acts on a higher level / layer then the ones that are listed in that book. This is a pattern that is used in the 'domain layer' of your application. Just like the 'specification pattern' for instance.

Frederik Gheysels
A: 

there are no new design patterns. the ones in the gang-of-four book (modulo a few) are pretty much orthogonal and complete. there are lots of other types of patterns.

Ray Tayek
A: 

You could easily fill that much time just by focusing on the Reactor pattern (not in GoF). See this Wikipedia link for info and examples of different implementations (Twisted for Python is one).

Anon