Wednesday, January 5, 2011

Design Patterns....

You get a problem to solve, you realize that this is nothing new and people must have already solved it. You look for the best fitting solution to your problem, it is highly likely that you will find a solution that perfectly matches your problem definition. What you have found is nothing but a design pattern.

Design patterns are nothing but they are solutions to the most common problems that we face in our day to day life. They are already documented, tried and tested from time to time by generations. If by any chance you don’t find a solution to your problem definition(every problem is a different problem) then you have a chance to invent a new design pattern. Therefore the patterns are not fixed in number and you may have a unique problem that will need a design pattern that is not defined already. It may happen that you have more than one patterns that appear to be solution to your problem, it complete depends on you to choose a pattern for your problem, as I said every problem is different and choose a solution that best meets you requirements to keep things simple.

There are three main categories of design patterns
Creational: These patterns will control the creations of objects in the projects
Structural: Controls and decides the structural aspects in the project
Behavioral: Controls the behavior of your objects in a project

There are around 35 patterns that are already defined in above categories. In my following posts I will try to explain these patterns in most simple language as I understand them.

Until then..keep thinking!

No comments:

Post a Comment