views:

72

answers:

2

What are the features (e.g. cookie, session, template, database handling) should a ...

  • robust
  • scalable
  • flexible
  • OOP-compatible
  • MVC
  • expandable

... PHP Framework be composed of? and what other features would be great for any developer in a PHP framework?

I've been looking a lot at frameworks such as CakePHP, Symphony, and so on.. their features are pretty common.

+1  A: 

Having a nice ORM makes a big difference. It makes your code much more easy to read and maintain by not having SQL queries strewn all over the place.

Another mandatory feature, as far as I'm concerned, is URL routing. It makes a big difference (especially for SEO) being able to write URLs any way you want. Cake supports that, and I haven't checked but I imagine the other popular ones do as well.

I've used CakePHP for several projects, and it's pretty nice, once you get used to it. I picked that over Symphony, CodeIgniter and Zend, but that was a while ago so those might have had substantial improvements.

Dan Breen
A: 

Basically, the primary reasoning for creating your own framework would be that you are dissatisfied with the frameworks available.

However, I think that a PHP framework should have the following components:

  • A nice ORM - like Dan Breen said (I'd recommend Doctrine)
  • Good, dynamic, lightweight URL routing
  • Fine grained configuration with cascade (project, application, module, controller level)
  • I18n & L10n support (also ability to handle different languages in URLs)
  • Loosely coupled (I like symfony, but I really also like that I can use different components from Zend Framework. I see ZF as more of a 'toolbox' than a framework)

That's just some of the most important elements and the elements that I value the most in the frameworks that I use.

I would think twice before starting to develop my own web framework - especially before starting developing it as an open-source project.

phidah