oct
2008
Choice is bad; PHP has too many Frameworks/CMSs
One thing I find frustrating with PHP is the number of different frameworks and content management systems available. It seems every company, organization and often individual has a preferred framework and often you just have to pick it up as you go along.
There will always need to be a selection of frameworks but PHP doesn’t have one key framework. There are many and I won’t to list them all for fear of missing one and insulting somebody! ;) The interesting thing about all these frameworks is that most of the time they don’t have a key feature that makes them stand out. So, in that case, why do they exist?
Quoting from the python Zen (yet again); “There should be one-- and preferably one --obvious way to do it.” This certainly isn’t the case with PHP or PHP frameworks and its even a problem at the language level. Should I use procedural, OO or a mixture of the two? etc.
Why is this really a problem? When looking for a PHP developer you need to make sure they are up to speed with the environment you are using in terms of framework but you also need to check programming style (oo vs proc). Hopefully these days you won’t need to check they are using PHP 5… but you probably should anyway.
Most other languages (at least to me) have clear choices of tools. Of course these languages have alternative frameworks but these are generally used.
- C# - ASP.NET
- Ruby - Ruby on rails
- Python – Django
- and so on...
It should also be noted that PHP does most of what you need out of the box and while it claims to be a general purpose scripting language it is clearly aimed towards the web. Without a framework often you are left to re-implement many basic features with other languages but PHP handles most of these. It is therefore too easy for somebody to make a framework/CMS solution or their own and put another pointless project out there.
So, does this mean PHP has too many good dispersed ideas? Possibly. However I think more of an explanation is who uses PHP. Some are trained software engineers while some are hackers that don't really code and just bash solutions together and everything in between. Without any backing or proof I'd be willing to guess more developers from a non IT background use PHP than any other language. PHP is very easy to start with but it’s also very easy to go wrong. This means trying to make one key framework is impossible, however it doesn’t mean there is a need for the hundreds that we have.
I would love to see frameworks explain to me why they should exist, what is it they have to offer that I can’t get in other frameworks. Answers like ‘we do it better’ and so forth don’t really apply, otherwise why are people not using your framework?
Some people say choice is good, in programming I think too much choice is more often than not bad.
And I just wont even mention the namespace character fiasco in the PHP community just now…
Short url - Related tags: frameworks, language-features, php, python, tips-and-tricks