Andrew Connell [MVP MOSS]
1339 Posts |  39 Articles |  3304 Comments
.NET  |  MCMS  |  SharePoint  |  Office System
PDCBling
SharePoint Quick Links
Article Categories
Archives
Post Categories

View Andrew Connell's profile on LinkedIn

Add to Technorati Favorites

[via Darrell Norton]

Good post by on Darrell Norton’s blog about design patterns and refactoring.  I couldn’t agree more about his comment on Joshua Kerievsky’s book Refactoring to Patterns.  I’m a little over halfway through this book and find it to be THE missing link (at least for me) on understanding refactoring & design patterns.  The only problem: I want to have Martin Fowler’s Refactoring and the GoF’s Design Patterns on my desk at the same time!  Pretty tough when you keep just one of them in your bag to and from work.

Yet another reason for you to subscribe to Darrell’s blog.  Hope I run into him at TechEd 2005 in Orlando!

Bill Venners just posted Part 1 of an interview with Erich Gamma called How to Use Design Patterns. So why should developers learn patterns?

"I think patterns as a whole can help people learn object-oriented thinking: how you can leverage polymorphism, design for composition, delegation, balance responsibilities, and provide pluggable behavior. Patterns go beyond applying objects to some graphical shape example, with a shape class hierarchy and some polymorphic draw method. You really learn about polymorphism when you've understood the patterns. So patterns are good for learning OO and design in general."

Learning about patterns is also learning about Object Orientation, since patterns are OO applied to certain types of problems. Erich really liked the Head First Design Patterns book as a resource for learning patterns.

Developers just starting to learn design patterns often suffer from design pattern-itis, that is, they think "I need a new object, so I'll use an Abstract Factory." But don't start your application with patterns:

"Do not start immediately throwing patterns into a design, but use them as you go and understand more of the problem. Because of this I really like to use patterns after the fact, refactoring to patterns."

That is why Joshua Kerievsky's book Refactoring to Patterns is such a crucial book. (I haven't studied it extensively yet, but I've read parts of it and it's excellent.) Not starting with patterns allows the architecture to emerge around an application's abstractions:

"That's something you can often observe in mature designs. There are some key abstractions you often see as a design center, and around those key abstractions you want to achieve various things. So you see patterns growing out of such a center."

posted on Thursday, May 26, 2005 12:30 PM

Feedback

# re: How to Use Design Patterns 5/26/2005 1:15 PM Darrell
Yeah man, I'll see you there!

# re: How to Use Design Patterns 5/27/2005 1:57 AM Haacked
Ha, I was inspired by some code I've seen to write about "Patternitis".

A good example is an interface that's never used, but only implemented. What's the point of the interface, if you never reference the interface? Having classes implement it only confuses the code.

Post Feedback

Title:
Name:
Email:
(email will not be displayed)
Url:
Comments: 
Please add 3 and 6 and type the answer here:    
All Comments Are Filtered & Moderated
Unfortunately comment spammers are just too effecient and are constantly dirtying up blogs with irrelivant and unwanted comments trying to improve their standing on search engines. All comments on this blog are moderated. I do not censor comments, but I don't approve comments with vulger language or those soliciting products. Most of the time comments are approved within a few hours of being submitted with the only exception when I'm traveling.

Why are you asking for my email address?
The only reason I'm asking for your email address, which isn't required to submit a comment, is to provide a gravatar if you've created an account for yourself and associated your email address with a small image. If you have a gravatar created for the email address you submit, it will appear next to your comment. Otherwise nothing will appear.

What is a gravatar?
A gravatar is a "globally recognized avatar." You can get more information about gravatars, as well as create your own for free, at www.gravatar.com. You can also view my gravatar here.


Copyright © 2003 - 2008 Andrew Connell
Creative Commons License 
This work is licensed under a Creative Commons License
Site design by Heather Solomon.

 
 
MOSS WCM Training
Looking for MOSS 2007 WCM developer training? Look no further! I teach my 4-day hands-on and 5-day online WCM classes for developers I offer through the Ted Pattison Group.

Get more information on the WCM courses!


Upcoming Classes
 Hands-on WCM:
 » Irvine, CA
   Aug 4-7, 2008
 » Atlanta, GA
   Sept 22-25, 2008
 Online WCM:
 » July 21-25, 2008

» Register today!

JAX Office Geeks
Jacksonville Office Geeks (JOG)
JOG is a special interest group in Jacksonville, FL dedicated to bringing the local SharePoint commnity together to share tips, tricks, ideas and best practices for developing solutions on the SharePoint platform.

Next meeting details...
When:
 » TBD
Topic:
 » TBD
Speaker:
 » TBD


» Subscribe to the JOG newsletter