Do We Need Design Patterns?

September 14, 2009

Do We Need Design Patterns?

In the previous week I have been asked “do we really need design patterns
when we write code?”. Since one of the first things that I wrote in my blog
was a design patterns series you probably would think that I answered SURE!
or other absolute answer.
That isn’t the case.
The question was raised since I saw that a developer tried to enforce a
design pattern (abstract factory) that wasn’t needed in some place in the
code. What I really believe in is that design patterns are guidelines
of how to build better object oriented design but…
sometime it is being abused like every other aspect in programming.
You don’t need to enforce a pattern in code if what you only need is very
simple implementation.
Yes, reusability, scalability and other phrases that are connected to design
are very important but so does simplicity or other
object oriented design principals like S.O.L.I.D.

In conclusion, we need design patterns but there are other things to consider
when you develop an application. To write it in other words –
When the only tool you have is a hammer, it is tempting to treat everything as
if it were a nail
” – Abraham Maslow.

DotNetKicks Image
Add comment
facebook linkedin twitter email

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>



  1. RajeshSeptember 17, 2009 ב 14:35

    We need patterns and its good practice.Just do not know when and where to apply it.Patterns are not solutions for everything .. but rather most of the things.

  2. JonSeptember 19, 2009 ב 15:34

    Design patterns can be abused by newbie-programmers that try to show their skills.

    Interviewers that asks questions about that subject – make a progress to that direction.

  3. bwtaylorSeptember 19, 2009 ב 22:17

    Do we need to use design patterns? No, if used correctly they can guide us through solving recurring problems in ways that are easy to identify and maintain.

    That said, when we use design patterns, we need to use them **appropriately**. Jamming an abstract factory in where it makes no sense to do so does not mean that using patterns is bad, it means that using patterns badly is bad.

  4. sq33GSeptember 24, 2009 ב 11:50

    Design patterns are tools. Programmers can use them to make their work better and more efficient (this includes maintenance). When the design pattern is making work worse and less efficient, it is no longer a helpful tool and should not be used.

  5. YonJanuary 5, 2018 ב 15:44

    Loved it!
    it’s really important to know how to code right , would love to see everyone learning more about design patterns