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

phpPatterns:
Hello world in Patterns
Apr 16, 2004 @ 12:22:41

In a "cautionary tale about design patterns", phpPatterns.com has a new article that helps developers avoid just that.

Hello World in Patterns steps into the world of (even simple) design patters that could, potentially, be abused way too much in your code. The example he gives, of course, is the output of a "Hello World" string. Something that could be as simple as a few lines is enhanced here to show excessive coding as well as a complete misuse of resources when running the script.

All of these observations are apalling when seen in a larger perspective. The example seems to support the notion that design patterns can cause problems which are easy to get into, hard to diagnose and hard to resolve.

If this code had been slightly more sophisticated and less obviously meaningless, it might be quite hard to refactor. It's like a labyrinth. The smell of decay from dead design patterns is not a very distinct one.

tagged:

Link:


Trending Topics: