Iris Classon
Iris Classon - In Love with Code

Design patterns: getting some guidance in the jungle

A good book for somebody that wants a fun and relative short introduction to design patterns. Don’t let the cover fool you, this isn’t a childrens book :D Started of the morning reading Head First Design Patterns, a well-written book that provides a very good introduction to design patterns. I mentioned briefly that we have started talking about MVVM, which is a design pattern. As Wiki puts it, design patterns are: “ general reusable solutions to a commonly occurring problem within a given context in software design…. It is a description or template for how to solve a problem that can be used in many different situations. Object oriented patterns typically show relationships and interactions classes or objects without specifying the final application classes or objects that are involved.” Any wiser? Well, we are not talking about design as in colors and fashion designers. It is way more exciting than that! When you get over the hobby-level of programming, which I hope I am over by now, you will get to the point where you wonder- how the hell shall I lay out all my classes and objects and so on? Since every application is different, and updates will also require different solutions, there is no ‘This is how you do it’. I was kind of hoping for a: put this here, that there, write a little here and voilà. Nope. Not happening. Instead, it is kind of as with exercise, there are some basic principles that should not be broken and are almost always true. Like the principle of progressive loading to increase muscle mass, and the Open-close principle in object oriented programming. But HOW you do it, see- that is where it gets tricky. We know we all can’t have the same workout program, (you might have a different goal, different tools and maybe even an injury!). I just learned it’s the same thing with programming. And design patterns are, kind of, different ideas for how to solve some problems. And often you will need to use several of them. And as with exercise programs, everybody will claim their solution is the best and will fix everything. Talking about exercise… I’m going out for a run. When I feel more comfortable with Design Patterns I’ll try to explain it in layman terms- right now it is quite new to me, and although I think I get it, - hehe ,- yeah I’ve been there before… ;) Edit: One of my classmates, Daniel F. also wrote a blog entry about Design Patterns, have a read!

Comments

Leave a comment below, or by email.


Last modified on 2011-11-09

comments powered by Disqus