symfony vs cakephp [closed] symfony vs cakephp [closed] php php

symfony vs cakephp [closed]


Just to balance out this thread, this is why I like symfony:

  • uses PHP5
  • it runs some really big sites like Yahoo! Answers, delicious, and Daily Motion.
  • good documentation. the jobeet tutorial on the website is awesome. walks you straight through all of the features, and after you are done you feel like you can build anything.
  • is highly modular; many of the symfony components work on their own.
  • allows you to choose either Propel or Doctrine as your ORM. Doctrine is really great and easy to use.
  • you can define your models with YAML or in PHP, its up to you. Some people don't like configuration files, and you can really limit their use if you want to steer clear of YAML.
  • the updated symfony cli (as of 1.2) is awesome. I agree with abales, before this version it was a little wonky, but now it is very well documented and follows a predictable format.
  • there are a lot, and i mean a lot, of similarities with ruby on rails, except that of course PHP isn't quite as pretty or flexible as Ruby(!). But, if you talk to a cake developer, they will probably say the opposite :)
  • the symfony admin generator, which is a step up from CRUD (which also exists in symfony), is a huge time saver. Using your data model it will generate customizable admin interfaces complete with list views (index), create, and edit pages. It's not like basic crud where it generates the source and you go in and modify it... You actually can define how each field looks, which fields you want to include, what additional actions you can perform on each object, and so on.

Conceptually, I'd say the difference is this:

  • CakePHP has a smaller learning curve. If you have never used a MVC framework, Cake will be easier to pick up and run with in a short amount of time.
  • Symfony feels bit "bigger," not to say that it is slow, but that there is a lot of code back there that will let you do a lot of really advanced things when you need to.

The best advice I can give is to quickly try to set up a your own simple data model in both, and experiment with some basic interfaces, and just see which fits your own coding style the best. I think both frameworks have very active and passionate user communities and you won't regret your decision either way.


  • CakePHP philosophy is similar to Ruby on Rails.
  • CakePHP is better for medium projects.
  • CakePHP is faster to learn.
  • CakePHP is lighter than symfony.
  • CakePHP's Database Interaction uses CRUD.
  • CakePHP uses the test system PHPUnit.
  • Is interesting in CakePHP Bake and scaffolding.

  • Symfony's philosophy is each version is different.
  • Symfony's is slower to learn.
  • Symfony's is best for large projects.
  • Symfony's Database Interaction uses Doctrine.
  • Symfony's uses the test system PHPUnit.
  • Is interesting in Symfony's Bundles and templates.


A big difference is in how models are created: CakePHP models are written in PHP, and Symfony models are written in YAML and powered by Propel. CakePHP's approach is more similar to ROR's ActiveRecord (although it isn't exactly an AR implementation). CakePHP, in general, is more rails-esque.

CakePHP's documentation and tools, in my opinion, have a wider target audience and the syntax and helpers are easier, but thy have yet to embrace PHP5 as their exclusive target (to autoloading isn't really there). In general, I prefer CakePHP's approach because it sort of follows an established standard, and I applaude it's organization. I'd also recommend Kohana for it's PHP5 goodness.

There's another post on stack overflow about this question, although its a bit different in focus.


Edit: I revisted Symfony to find the reasons I said 'no' and came up with these — your opinions and mileage may vary:

CakePHP also offers dead simple scaffolding and easy to understand CLI tools. Symfony's CLI syntax is a bit wonky to me, and 'CRUD' in Symfony just isn't the same. Combine that with Symfony's (awkard) action syntax and throw in Symfony's poorly designed (and challenging to understand) website, and preference for 3rd-party paid documentation (books on Amazon) and you have more ticks in the cons column.