SgDotNet
Singapore Professional .NET User Group -For Cool Developers

Are Design Patterns really that bad?

Latest post 04-11-2008 2:13 PM by cruizer. 8 replies.
  • 07-19-2007 2:12 PM

    Wilted Flower [W] Are Design Patterns really that bad?

    Once of those rare times when I have to disagree with Jeff Atwood's opinions.

    The melody of logic will always play out the truth. ~ Narumi Ayumu, Spiral

  • 07-25-2007 6:54 PM In reply to

    Re: Are Design Patterns really that bad?

    icelava:
    Coding Horror: Rethinking Design Patterns:

     

    It's certainly worthwhile for every programmer to read Design Patterns at least once, if only to learn the shared vocabulary of common patterns. But I have two specific issues with the book:

    1. Design patterns are a form of complexity. As with all complexity, I'd rather see developers focus on simpler solutions before going straight to a complex recipe of design patterns.
    2. If you find yourself frequently writing a bunch of boilerplate design pattern code to deal with a "recurring design problem", that's not good engineering-- it's a sign that your language is fundamentally broken.

     

    Point no.1 stressed "before", which i fully agree. However, to be able to come out with something "truly simpler" is itself a tough job.

    Point no.2 made sense too...the key word here is "frequent"

     

     

  • 07-26-2007 3:02 PM In reply to

    • cruizer
    • Top 25 Contributor
    • Joined on 07-25-2007
    • Singapore
    • Posts 153

    Re: Are Design Patterns really that bad?

    i think this all stems from developers that are too patterns-happy...design patterns have consequences, some of them negative. in the seminal GoF book the consequences were mentioned and programmers ought to take notice.
    http://devpinoy.org/blogs/cruizer
  • 04-10-2008 9:38 AM In reply to

    Re: Are Design Patterns really that bad?

    I agree with statement no 1. It does add complexity to the overall solution. However graceful software designs will always come at a price=> complexityStick out tongue. My approach is that i will always look at the requirements and analyze accordingly. If the requirements is simple and can be done quickly, why make use of design patterns then? However if requirements is complex and extensibility is an important aspect of the solutions, then design patterns are appropriate to use.

     

    For statement no 2, I think it makes sense. Using design patterns is supposed to make future coding easier to do. If it is going to be more difficult in the future, why bother using it in the first place? However I have reservation in design patterns making future scalability more difficult. It must be due to wrong pick of patterns or "use design patterns just for the sake of using it"Stick out tongue

     

     

    Filed under:
  • 04-10-2008 10:36 AM In reply to

    Re: Are Design Patterns really that bad?

    Gotta remember what my main driving point was, and still is, 

    icelava:
    Design patterns in my understanding is about finding the simplest, most elegant way to tackle a problem. By establishing a common volcabulary and understanding of its concept, development teams can deal with them quickly and move on to handling more business/domain-oriented problems. In my experience, the lack of design pattern use resulted in monolithic, inextensible, brittle, defective implementations that is complicated and unwieldy. Both to the user and developer. I do not know how many times I saw parts of a system and went, "ouch, if so-and-so pattern was implemented here, how much simpler it would have been!"

    The melody of logic will always play out the truth. ~ Narumi Ayumu, Spiral

  • 04-10-2008 12:17 PM In reply to

    • cruizer
    • Top 25 Contributor
    • Joined on 07-25-2007
    • Singapore
    • Posts 153

    Re: Are Design Patterns really that bad?

    that is why i espouse "refactoring to patterns." don't just apply patterns blindly. sometimes you have to feel the pain so you can appreciate how a particular pattern alleviates that particular "pain."
    http://devpinoy.org/blogs/cruizer
  • 04-11-2008 9:08 AM In reply to

    Re: Are Design Patterns really that bad?

    I agree with your point on design patterns will make the whole design look elegants. But for simple solutions, is it really appropriate to use design patterns?I personally in business sense, only good developers are able to make good use of design pattern, but it always comes at a higher costs. For small projects, I don't think that customers will have budget for it. 
    Filed under:
  • 04-11-2008 10:18 AM In reply to

    Re: Are Design Patterns really that bad?

    hendry:
    But for simple solutions, is it really appropriate to use design patterns?

    For sure, use the simplest solution to the problem. No arguments there. My point is, what most people come up with in the end is anything but simple, when a design pattern could have been so much more effective.

    Take for example, imagine a UI with a main window featuring multiple tabs. The main window has two modes of display - side info panel expanded, and collapsed. When the side panel is collapsed, there is more horizontal space for the controls so they need to be lengthened. Wouldn't it be nice to implement an Observer so that each tab is simply listening for an event from the main window on panel bar expansion/collaspe, and do whatever they need to resize the controls (I suggested anchoring for the matter)? Nope. My colleagues implemented a convoluted web for function calls from main window to tabs, and from tabs to tabs and back to main window, each then reading XML files for exact sizes for each controls. It took probably 30secs to a minute for the resizing to happen.

    My angle - use the fastest straight-on approach. Do not try to feed yourself a banana by wrapping your arm around your head.

    The melody of logic will always play out the truth. ~ Narumi Ayumu, Spiral

  • 04-11-2008 2:13 PM In reply to

    • cruizer
    • Top 25 Contributor
    • Joined on 07-25-2007
    • Singapore
    • Posts 153

    Re: Are Design Patterns really that bad?

    wow what a fancy solution. i'm sure the developers there felt pretty proud of themselves after they made it, ha ha! Stick out tongue
    http://devpinoy.org/blogs/cruizer
Page 1 of 1 (9 items) | RSS
Copyright SgDotNet 2004-2008
Powered by Community Server (Commercial Edition), by Telligent Systems