Bruce Eckel wrote and made available on the net a book titled, "Thinking in C++" (affectionately called TIC) that was my main resource for a couple of years. One day I was trying to download "Thinking in Java" when I noted a new title: "Thinking in Design Patterns" -- this was my first introduction to design patterns. Well, I should have said, "this was my first formal introduction to design patterns" because I had of course run across them in OO design books but I had not picked up the concept of reusable solutions.
Design Patterns are about capturing reusable solutions to software engineering problems. These solutions, once identified, can be captured and described in an abstract language (well this is a bit of a fuzzy area) and then applied in a number of different languages. Most design patterns are actually a subset of Object Oriented (OO) design though it should be noted that technically design patterns are not limited to only OO design.
Design patterns can be wonderful. In C++ they can often help solve problems of memory management, in Java they have been put to use in some very powerful frameworks. However, they can also overly complicate code, lead to code bloat, produce slow and unproductive programmers. -- i.e. try to use them when they are appropriate, make your code more elegant and maintainable,
allow you to speed up your development process..... on and on and on... when it is good design to do so.
To that end I would like list some resources to learning how to use design patterns:
- www.oodesign.com -- I like this site, it is a nice general referance, has clear UML diagrams, code examples, and use cases.
- Do Factory Although it centerns on .Net languages this is a great resource for patterns and describes the patterns in UML and gives some example code and use cases.
- The Portland Patterns Repository -- I find this a hard place to find what I am looking for, but there is a good deal of information here.
- Patterns and Software: Essential Concepts and Terminology -- This is a great paper that covers the ideas behind design patterns.
- Design Patterns on Wikipedia -- This is a nice basic resource for information on many patterns. There are code examples in a number of languages.
- www.exciton.cs.rice.edu -- although this is mostly a Java resource they also have a C++ section and often talk about the differences between the patterns when applied on different platforms.
- Design Patterns @ FluffyCat.com -- the name is cute, and the code examples are in Java.
- Design Patterns @ Java Camp -- Nice java examples.
- The Design Patterns Java Companion -- Googled this one...
There are a number of books that should be considered when working with Design Patterns, the most important is:
Design Patterns: Elements of Reusable Object-Oriented Software
A really good java resource is:
Head First Design Patterns: This is a pretty good book for understanding what is going on with design patterns in java.
For EJB developers:
EJB Design Patterns @ TheServerSide.com A downloadable e-book. I have not read over it yet so I can't really comment.
Thinking in Patterns for Java
Here on DIC you can find tutorials on:
The Command Pattern by Bench.