The Importance of Design Patterns

I have a secret to tell. I didn’t go to college for computer science (gasp!). Actually, I started to but dropped out because I couldn’t sit for 2 years to get a !$#$& Associative of Arts degree before I could actually start learning computer science.

Instead, I learned programming on my own from books and other programmers. I have been programming for almost 10 years now and it was only 2 years ago that I heard the phrase “Design Patterns”. My friend Mike started talking about composition and using this pattern and that pattern. I thought, “is he making a quilt or are we still talking about programming?” Well, he wasn’t making a quilt. What he was talking about were the terms that describe the techniques used by coders to solve common programming problems.

As he described different design patterns I recalled projects in the past where I had used a similar coding technique. I also remember how long it took to figure out that technique on my own. It also didn’t occur to me to name the technique. That is what is brilliant about it. What design patterns do is name and describe the techniques. It became apparent to me that if I learn design patterns now then I will be able to accomplish so much more.

I got a book on it and started reading about each one. Each new pattern I learned made me feel like I was leveling up. If I was a video game character my power meter would skyrocketing. If I was a ninja I would be learning hidden ninjitsu moves. If I was a mechanic I would be acquiring much needed tools.

I was surprised at the number of computer science degree students who do not have a grasp on design patterns. I do not think it is enough to know only OOP. Although, if I am correct, the term was not really defined up until 10 years ago. It should definitely be apart of any computer science degree curriculum.

There are a couple of places you can go to read up on the subject. A lot of books will teach you about them. One of the ones I like that also gives some practical examples is, Head First Design Patterns. It is written for Java programmers but you will have no problems understanding the concept. In fact the Java syntax is so close to ActionScript 2 and 3 syntax that you will forget sometimes that it is not either of them. Go and learn it and you will make you’re life so much easier. Trust me.

Update (June 28, 06):
While I was browsing my local Barnes and Noble I stumbled upon Design Patterns for Dummies. Being a dummy I knew I could get right into it. I started reading and within a half hour I had learned 4 design patterns!!! YAY! I really like this book!

3 Responses to “The Importance of Design Patterns”

  1. JabbyPanda says:

    We have “Head First Design Patterns” book at the office and many more.

    No wonder, we are using Design patterns heavily in our Flex 1.5 based project.

    Our project currently reached the size of 1200+ AS files and 260 MXML files, we have no choice.

  2. Judah says:

    I noticed with Flex and the new wave of Flash and ActionScript 3 that design patterns are being used and talked about everywhere. I don’t think it will be enough for someone to just know the ActionScript syntax in the future. If you look at the Flex tags and ActionScript 3 API you will see ItemFactory and abstract this and abstract that. These are a mix of OOP but you see the Factory Pattern is being used.

    I’d like to see one day a Flash or Flex product box that says on the side,

    Requirements for ActionScript 3:
    An understanding of Object Oriented Programming
    the Factory Design pattern, Polymorphism, Encapsulation and Composition

  3. JabbyPanda says:

    The end-user does not care how the project was made and what architecture was applied to the web app.

    The main difference is while the projects developed by the help of Flex become bigger and more encompassing, the good architecture ( preferably based on design patterns or at least OOP) for the web-app is a MUST.