Saturday, March 3, 2007

Design principles and patterns

Principles and patterns are really interesting to know a bit about. Foremost of course since you become a better programmer when you have some knowledge about how to best solve a problem. Which is the basic idea behind these thoughts. Principles are ideas that are always true and that you should try to abide to at all times. Patterns are templates for solutions that you can combine (which are of course based on the principles).

To have some knowledge about principles and patterns also makes discussions about different solutions and their pros and cons so much easier since you don't have to explain in detail what you doing. You can just put it like "...and then we use a bridge pattern to...". Or "someone totally forgot about single responsibility when designing this and now everything sucks". Excellent don't you think!

Here are a couple of resources:
  1. GRASP (General Responsibility Assignment Software Patterns), Craig Larman came up with these (or do he just refer to them? can someone plaease set me straigh on this issue?) and they are well documented in his superb book Applying UML and Patterns
  2. SOLID, Robert C. Martin
  3. GoF (Gang of Four) Patterns, the mother of all patterns, these patterns were originally published in the book Design Patterns by Eric Gamma, Richard Helm, Ralph Johnson and John Vlissides
  4. Patterns and Principles, a page that refers to the above and more and links to other excellent sites as well
  5. David Hayden has some nice articles in his archive about the GRASP patterns.

No comments: