Comments On Last Nights Design Patterns Talk

Last night I presented on simple design pattern at the Denver .Net User’s Group.  Here are a final comment:

During the presentation I received a very valid questions.  ‘Why use a pattern when I can just code the new functionality right into my concrete object?’  The answer I gave last night was you CAN code the functionality right into the base object.  That would work just as well as using a pattern to do it.  I stick by that answer.  If there was a cookie cutter solution for every software issue out there, we would all be out of a job.  From all the announcements on job posting before the meeting we can all see this is not the case.  What I’m trying to say here is that design patterns are not meant to be the end all be all of OO design.  So, don’t try to ‘fit’ your solution or design into one of these patterns.  Instead, focus on the underlying philosophies of these patterns to solve the problem.  The most common philosophy in patterns is coding to an interface.  Use interfaces and base classes as much as possible to provide flexibility and ease of maintenance.  So, when your out there researching and learning design patterns, try to think outside the box and by all means modify the pattern to solve your issue.

I got some great feed back from Brad Wood (Thanks Brad!).  He sent me a great link to Jeff Atwood’s blog post on the Gang of Four book and how it is misused in some cases.  It relates to what I said above.  I will let you read it and try not to skew your opinions of it.

The title on my blog is Keep it Simple Stupid.  I try to use that every day when I design and code.  Some design patterns are overkill for many issues.  So, the challenge we all have is to learn these patterns back to front so we know when a pattern is the right solution and when it is overkill.

Also, I forgot to mention this when I posted the samples and demos but if any of you have your own blogs feel free to post and link to my blog if you deem it worth.  That is all I’m going to say on it.

Posted in |

3 comments:

  1. Anonymous Says:

    Ben, Just a quick note of thanks for the presentation. I am new to .NET programming and your presentation was just what I needed. I enjoyed it very much and you've opened up a number of other possibilities for the projects I'm working on. Glad to have found your blog.

    Regards,
    George

  2. Robin Says:

    Ben, are you married? You are one hot code guy!

  3. Ben H Says:

    Hey Robin, Not sure if this is a joke or what, but I'm happily married with children.