News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Zend Developer Zone:
Design Patterns I Hate
May 18, 2011 @ 10:18:21

On the Zend Developer Zone today there's a new post from Keith Casey about some of the design patterns he hates - ones that are misused too often and have become more of a "worst practice" at times than others.

To be clear, I think Design Patterns have their place. When used properly, they can make our lives easier and our code better. When they're misused - "If the only tool you have is a hammer.." - then they can become the bane of our existence. Unfortunately, some Design Patterns seem more susceptible to this than others. So maybe this is less "design patterns I hate" and more of "design patterns that have been abused beyond all sense of reason"... I'll let you decide.

He has three of the most commonly misused design patterns in his list. Anyone who has looked into using patterns in their applications will recognize them:

  • Active Record
  • Factory
  • Singleton

For each, he describes some of the bad implementations he's seen and notes that, while these are commonly abused, they can still be redeemed by being used appropriately.

0 comments voice your opinion now!
designpattern opinion misuse activerecord factory singleton


blog comments powered by Disqus

Similar Posts

PHPClasses.org: Lately in PHP, Episode 23 - Will it ever Matter if PHP Sucks?

Jani Hartikainen's Blog: 5 ways how PHP is better than Node.js

Gonzalo Ayuso's Blog: Moving singleton and factory patterns to Abstract with php 5.3

Juozas Kaziukenas' Blog: Zend Framework is NOT bloated

Matthijs Tempels\' Blog: ActiveRecord Bugfix and Hooktable Support


Community Events





Don't see your event here?
Let us know!


community language symfony laravel introduction voicesoftheelephpant podcast install update release opinion package tool version series security composer framework library interview

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework