PHP framework

Cristian Gilè
28 July 2009, 18:28
Hi Hugo,

what is, according to you, the best PHP framework?

A PHP framework is a personal choice, but I'd like to know your opinion, first of all, about security feature (which framework is bad and which framework is good).


Hugo Leisink
28 July 2009, 18:39
In my personal opinion, the most horrible framework is Drupal. I did some testing and found that for a single page which showed 15 items from the database, Drupal needed 418 database queries. I also think that the hooking system is really bad. It's a failed attempt to implement OO features without actually using OO. If one page fails to load (due to a syntax error), all other pages that have hooks in that page also fail to load. Also, it's code structrure and the code itself are a big mess. You might wonder what this as to do with security? Well, everything. Bad security is caused by bugs, which are caused by making mistakes, which is caused by not having the right overview of your code. Drupal's code mess gives you a hard time while trying to get that overview. Drupal is dangerous. My advice: stay far away from Drupal. To prove my point, look here [].

I've heard good things about CakePHP. It has a nice MVC design (which Drupal also lacks) and is very well documented. Secunia only gives two advisories, which are dated from 2006.

Nevertheless, for my own websites I use my own framework, called Banshee. It has a strict MVC design, uses XSLT for the view, has a secure (of course) database library, some simple CMS features and ready-to-use libraries for HTTP, e-mail, pagination, etc. Big con of my own framework: it lacks documentation. I'm too lazy (or too busy with other things) on that point.
30 July 2009, 03:55
I second Hugo on this. I've had bad experiences with Drupal. Especially if your site will have several 1000's of visitors, don't use Drupal. You can try Banshee (though I've not worked on it much). I've used CodeIgniter - its very easy and has a lot of features. Kohana is derived from CodeIgniter and is run by a community. These two are light weight alternatives compared to CakePhp.

Its on my to-do list to do more experiments with Banshee.
Hugo Leisink
30 July 2009, 10:04
CodeIgniter is a fine framework. But I advice to not use the Active Record Class. I think it makes database queries unnecessarily complex. Large query constructions become almost unreadable.

(And I still don't understand the difference between a CI Library and a CI Helper. But that just me )
30 July 2009, 10:31
Thanks Hugo. I did not use active record yet. I started using, but then switched back to the simple style. I read somewhere that active record can take more execution time.

I've been reading more on Kohana and am starting to think that it might be a little better than CodeIgniter. But, I will wait until I do a project with it to conclude.

Btw. I've upgraded all my servers to Hiawatha 6.16. Thanks for the new release.
Michael Klein
30 July 2009, 12:51
Personally, I use symfony.

It's a huge framework with lots of subclasses and in-between-stages where you can put your code / intercept as you wish.
Paired with proper caching and with the doctrine-ORM it performs very well compared to its competitors.

Sure - it is way slower than my home-brewed apps, but the manageability and sizeability beats all slowiness...

Currently I finished a huge project with symfony as backend and ExtJS as frontend... it works very well on Hiawatha.

- Thanks Hugo.
7 August 2009, 18:37
CodeIgniter is my Framework of choice (for german-speaking users check out []).

The difference between a library and a helper is a simple, procedural function. Each helper function performs one specific task, with no dependence on other functions.

Libraries are more complex and cover more functionality.

Hope his helps.
This topic has been closed.