The PHP5 framework of choice: Symfony
Posted by Tim Bowler in PHP, Symfony, tags: framework, oop, php5, RAD, Symfony
Two years ago I wrote my own php MVC framework. It comprised of Smarty and ADOdb, and to be honest it got the job done. It was easy for both the non-technical and technical developers to get to grips with and decreased development time. But why did I re-invent the wheel? Well back then I tried and tested a number of frameworks, and because we were running PHP4 it seemed easier to create my own.
Early last year I tested out both cake php and Symfony. I wrote a small test website with both frameworks, and from my experience Symfony was easier to get to grips with and done a lot of the work for me. A few of the features that I found really good was the CLI, Lime testing, deployment, generators and best of all, its plugin architecture.
To give you an idea of the time we saved when creating an admin area, it usually took us a good few days for a news administration feature. With the aid of Symfony’s admin generator that time went down to a good 30 minutes, which in anyones book is excellent. After figuring out how to write plugins it was then time to turn parts of the administration areas into plugins.
My first plugin is for a news module. Not only does it provide support for frontend news, but it also provides the backend administration feature as well. The plugin works greate, and as part of the second release I integrated my plugin with the sfThumbnail plugin. Now the plugin allows up to one image per story. Thanks to the sfThumbnail plugin, in around 4 lines of code uploaded images are resized and thumbnails are produced. This plugin took around 6 hours from start to finish and has been applied to several sites now. So if you look at the big picture that’s a lot of time saved.
Since I have been using symfony I have seen the community, documentation, plugins and user base grow tremendously. A little later this year I will be making the plugins and snippets available. I would definitely encourage others to switch to Symfony if they haven’t already done so.
Resources:
- Symfony tutorial
- Sitepoint tutorial
- Symfony Offical book
- Symfony plugins
- Symfony Resource Central
- Yahoo! Bookmarks uses Symfony
- Eclipse Plugin
- Eclipse PDT and Symfony

Entries (RSS)