CakePHP is really cake!

25th May 2010

I’ve spent the last two months or so working on websites for various endeavors  and I’ve gotten to REALLY enjoy CakePHP.  So much so that dare I say that web development is now fun again!  In the olden days (about 5-6 years ago) we had to code up our own libraries to connect your website to MySQL and create queries, headers, etc.  With a good PHP framework, we can now spend more time coding and less time dealing with the intricacies of just getting your DB connections working (ie: more fun coding the working pieces vs the supporting pieces).

I’ve evaluated both CakePHP and Symfony and I liked both for various reasons.  I have found that the Symfony framework is just overly complicated when building a website that isn’t necessarily enterprise level from the get go.  To add insult to the injury, the framework isn’t thoroughly documented.  I found it extremely difficult to find something as basic as options for methods and the associated values that the options can contain.  Asking the forums just got overly redundant and thus required me to manually go through the framework code.  This isn’t too bad, but just took way too much time.  Isn’t time saving the reason why I chose a framework?

CakePHP on the other hand is very well documented.  In fact, the documentation is so good that you can get up and running in a few hours.  While the ORM isn’t as detailed as Symfony, I didn’t have to learn a whole new language in order to create simple queries.  CakePHP, to me just, just fits the PHP mindset better.  If you understand the MVC model and PHP, you probably can get the ball rolling in CakePHP within the hour.

Having said that, the testing utility in Symfony is amazing and the fact that you can develop offline using Symfony by using the built in models works really nicely too.  CakePHP is still faster for me for developing and creating databases and tables in MySQL using PHPMyAdmin is much more intuitive than hand coding everything in Symfony using Doctrine.

Apparently the early gripes with CakePHP were about HABTM tables, but those are now fixed in at least CakePHP 1.3.  The documentation in CakePHP as well as the support community on IRC is much more complete than Symfony.  This leads to a much faster development time and less downtime when you are stuck for an answer.

Overall CakePHP 1.3 is the clear winner in my book for development of the majority of the websites out there.  If you need enterprise level code Symfony might work for you, but I’m fairly certain the majority of the developers will develop from scratch to accomplish complete security and thorough code auditing.

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>