views:

1956

answers:

8

Pretty much every resource I've seen on design patterns always have examples like Dog, Animal, PizzaFactory, AbstractPizzaFactory and others.

I'm looking for good resource such as Head First Design Patterns with actual real-world patterns that will make the "understanding-process" slightly easier. In my opinion the factory pattern example in Head First is one of the worst examples ever, trying to keep track of what city what pizza is made in. ;)

There is a similiar question here: What are some real life examples of Design Patterns used in software although not exactly the same as this. So, any books/blog series/articles that match my esoteric requests? :)

+1  A: 

I think most people will agree that the best book on design patterns that there is, is Design Patterns: Elements of Reusable Object-Oriented Software (GoF).

Also I could recommend Design Patterns in Java book have this out the library myself at the moment, and you would be pleased to know it does not use the Pizza example for factory pattern instead it uses one about credit checking which is more real world.

For an online reference I actually find wikipedia's page on design patterns to be very good as they are listed with nice simple description and you can then look at them in more detail if required.

Mark Davidson
+1  A: 

I'm not sure this is what you're asking for, but Christopher Alexander's book A Pattern Language was the inspiration for design patterns. It's full of real-world examples from the field of architecture.

Bill the Lizard
+1  A: 

Design patterns in C# by Steven Metsker uses pretty good examples. The Factory method example is for enumerators, for instance. The Proxy pattern uses an image placeholder that displays a thumbnail while an image is loading, deferring display of the actual image via the Paint method until the image is fully loaded.

tvanfosson
A: 

You could try looking at this. It talks about the development of SharpDevelop and it contains some discussion of the patterns they used and why.

Otherwise I would post question here so developers, like myself, can post about their experiences with specific patterns.

RS Conley
A: 

You don't specify which language you're interested in, but the Java libraries are riddled with patterns.

java.io leans heavily on Decorator.

java.rmi is all about Proxy, as are most remoting capabilities in any language.

I think you might call java.sql an AbstractFactory, because when you load a JDBC driver you get all the classes that implement the interfaces for that database.

I'm sure there are others, but that's a start.

duffymo
+1  A: 

A fun way to find real life examples yourself is through google code search. Pick the pattern that you'd like to find an example for and search for it, e.g. 'strategy', 'bridge', 'factory'.

andreas buykx
+1  A: 

I agree with another comment regards GoF.

The Do Factory provides more real world examples of the GoF patterns. Another great feature of the site is that there examples of implementation using .NET (if that's you bag!) constructs such as Generics etc.

Also I always recommend Patterns of Enterprise Architecture by Martin Fowler.

A: 

Spring has a project that's implementing integration patterns by Hohpe and Wolff. Might be worth watching.

duffymo