I have been strug­gling prob­a­bly for over a year over a sim­ple prob­lem, which PHP frame­work should I use. The prob­lem is rather sim­ple at one level. I have been pro­gram­ming in PHP since… well I believe it was soon after PHP 3.0 came out although I didn’t fully make the switch to PHP from other web script­ing lan­guages until ver­sion 4.0 came out. As such, I devel­oped my own frame­work rather early for the var­i­ous projects I worked on. It is now in its fourth major ver­sion. But a year or so ago I kept hear­ing how it is so much eas­ier to not work on your own frame­work, rather use a frame­work that is well sup­ported and fully devel­oped. I felt like if the “experts” are say­ing I should switch to some one else’s frame­work, I would.

I began pour­ing over frame­works, nar­row­ing it down to six. I decided to test them by devel­op­ing the same sim­ple web app. It involved the stan­dard dis­play of data, a form, and CRUD data­base stuff. I tested each one for ease of use and good doc­u­men­ta­tion pri­mar­ily although I con­sid­ered things like cod­ing stan­dards, sup­port for mul­ti­ple data­bases includ­ing Postgresql, sup­port for the lat­est ver­sion of PHP, and good OOP prac­tices in their own code. Some I didn’t even fin­ish the test with, I just didn’t like they way they worked. I ended up with three final­ist, CodeIgniterexternal_link, Zend Frameworkexternal_link, and Symfonyexternal_link.

I found CodeIgniter to be very easy with which to work. I devel­oped the sim­ple web app the fastest with it. I almost stopped my test­ing there because of those two fac­tors. But as I looked at their code, I backed away. At least at the time I tested, their core code still was stuck in PHP 4 OOP writ­ing stan­dards. That really bugged me.

Zend Framework on the other hand took me the longest to get my head around. I was able to develop the app but it took me almost 4 times as long as it did with CodeIgniter. I haven’t tried the test with Zend Framework2 but I am think­ing of try­ing it just to see. There is some­thing appeal­ing about using Zend Framework since you know they will be keep­ing up with PHP capa­bil­i­ties and clients might find com­fort in know­ing it is backed by the PHP guys. But as I said, I had trou­bles get­ting my head around it.

I ended up think­ing I would set­tle on Symfony for my frame­work. I was able to develop my sim­ple app rel­a­tively quick once I grasped the Symfony way of doing things. The one thing I didn’t do was go all out with Doctrine ORM. I like writ­ing my own SQL, I know, I am weird. I also like hav­ing com­plete con­trol over how the data­base is con­fig­ured and the ORM just can’t han­dle some of the more com­plex ways of rela­tional data­bases. But, I have been work­ing with Symfony on two dif­fer­ent projects and pretty much grok the way it works.

And then along came a project that required a CMS first and fore­most but also needed to have a lot of cus­tom code added. Symfony CMS just isn’t there yet. I con­sid­ered Drupal and Joomla. I haven’t quite groked how to cre­ate a mod­ule in Drupal… not very happy with their doc­u­men­ta­tion. Joomla… well, I have worked on a mod­ule for it for sev­eral years. I know Joomla but quite frankly, don’t like it as a CMS. The project was to replace a ModX Evolution site so I got to look­ing at ModX Revolution (ver­sion 2 of ModX) and real­ized, “WOW! I can use ModX Revolution as a front end and a frame­work for the cus­tom code on the backend.”

ModX allows one to eas­ily add php code prac­ti­cally every­where. Once you grasp the basics of ModX it becomes rather easy to cre­ate a fully func­tional cus­tom site that has CMS capa­bil­i­ties that is easy for one’s clients to use to add/modify/delete con­tent on their site. Admittedly, it took me a bit to grasp all the terms and con­cepts. Chunks, snip­pets, tem­plate vari­ables, and the tem­plat­ing itself kind of feels over­whelm­ing at first (not as bad as Drupal though). There are things miss­ing from ModX that you find com­mon in other CMSes but for a devel­oper that wants a bare­bones CMS that you can add cus­tom code to eas­ily, it works well.

But then comes the prob­lem, I wanted to use Symfony for my frame­work for the cus­tom code. But both Symfony and ModX want to be the pri­mary con­troller. I could have used most of every­thing that Symfony has to develop my cus­tom code but that was going to take a bit of effort and time which I didn’t have. As such, I slipped into using my own frame­work and devel­oped the site quickly with ModX and with­out fuss. I real­ized at that point an inter­est­ing truth. All the pub­lic frame­works have to please a lot of dif­fer­ent peo­ple for a lot of dif­fer­ent rea­sons. As such, they become overly com­plex, not because they want to but because they have to be able to do every­thing for every­one. My own frame­work only has to please me and do what I need it to do.

I have always felt the main part of my own frame­work that was miss­ing was the abil­ity to give my cus­tomers easy to use, easy to under­stand CMS. My own attempts were some­what clumsy. All I have to do is use ModX in con­junc­tion with my frame­work and I have what I have wanted. Now, that doesn’t mean I am going to give up on Symfony. There are a lot of things that I feel com­pelling about it as a frame­work. I can prob­a­bly make it work with ModX or other CMSes. When Symfony CMS is ready for prime­time, Symfony may be all I need. But in the mean time, I am not going to neglect my frame­work. For me, it may always be the best.

Tagged with:
 

Leave a Reply

Looking for something?

Use the form below to search the site:


Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!

Visit our friends!

A few highly recommended friends...


Michael Kors Outlet Online wholesalejerseyschina Field Hockey Jerseys Baseball Jerseys Cheap Borsa Hobo Gucci Oakley Sunglasses In China Jeremy Hill Kids Jersey Jerseys Wholesale Cheap NFL Jerseys China Coach Factory Online Sale Cheap Nike NFL Jerseys China Us Louis Vuitton Outlet Cheap UGG Boots NBA Jerseys Junior UGG Boots Juliette Michael Kors Wallets New Cheap NFL Jerseys Not From China Jerseys Wholesale Cheap Jerseys Wholesale NBA Christmas Jerseys Cheap Oakley Sunglasses Cheap NFL Jerseys