News Feed
Sections




News Archive
feed this:

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

Matthias Noback:
The "dark" side of PHP
February 10, 2014 @ 12:58:14

In his latest post Matthias Noback talks about the "dark" side of PHP and some of the common problems of working with and using packages. This is the introduction from his upcoming book on the same subject.

PHP is actually a very problematic language. It has somewhat of a bad reputation. This is no surprise to me, given the huge amounts of bad code written in PHP, produced by novice "developers", yet available for a large audience to copy into their projects. [...] PHP has become such a big player - I guess - because it is so easy to learn. Starting with a simple HTML page it does not take much effort to add some dynamic functionality to it. There is no need to go to school and learn about programming before you can use PHP on your web server.

For all of this good that PHP brings to the table, there's also the bad practices that can come with it. While PHP can be forgiving about bad practices, there's only so far it can go before it starts throwing errors. Since the parsing comes late in the game, bad code can sneak in and not be noticed until it's used.

0 comments voice your opinion now!
package design misuse book introduction language

Link: http://php-and-symfony.matthiasnoback.nl/2014/02/the-dark-side-of-php

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



Community Events





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


symfony deployment laravel podcast install introduction opinion language library tips community framework series list voicesoftheelephpant api release package bugfix interview

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