Prajwal Tuladhar’s Blog
 
programming, life and some random thoughts

Dec 14 2008

A must read design patterns article

Published by at 12:51 am under Links,Patterns,Programming

I have found relatively old article about the design principle of design patterns dating around June 6, 2005. Though, the article is a bit old dated ( about 2.5 years), after reading it I have definitely learn something new and refreshing about design patterns and especially about the power and flexibility that can be gained from the use of interface.

Old is gold

The four page article in the form of interview with the design pattern guru Erich Gamma, famous for his landmark book Design Patterns: Elements of Reusable Object-Oriented Software (Addison-Wesley, 1995) and also a member of popular GoF (Gang of Four) is certainly worth to read if you are interested in design patterns and test driven development.

After reading it, I was able to summarize following points that seem quite interesting and important to me:

  • Program to an interface, not an implementation.
  • Integration between current refactoring tools and XP.
  • Composition over inheritance for low coupling and design flexibility in the sense that sub-class always have to make assumptions about the context of the method it overrides (my favorite).
  • Something can be public but that does not mean you have published it. Quote from Martin Fowler, but I’m still a bit confused about it and still researching. I have even posted a question in the stackoverflow but have been unable to get any response clarifying my confusion.
  • Interface inheritance. I have seen this when I was going through Repository Pattern in NHibernate.
  • Smaller objects configuring the container and customizing the behavior of the container.
  • Consistency in API design (for example: using depravation support in JAVA, .NET). Seems easy but really hard to achieve especially for beginners like me :)
Technorati Tags:

2 responses so far

2 Responses to “A must read design patterns article”

  1. [...] my previous post, I had posted a link about the interview with the design patterns guru Erich Gamma. After reading [...]

  2. Primo Fiorentinion 03 Feb 2009 at 8:16 pm

    nice article! nice site. you're in my rss feed now ;-)
    keep it up

RSS Feed
Subscribe by email
Follow me @ Twitter