9

We are going to switch from an homemade framework to Symfony or Yii. The capabilities of these two framework are, from our point of view, similar (ie they both have what we need).

Our situation : php 5.2.9, medium-size website (10.000 uniques / day) but shared hosting.

  • Given the version of php that we have, we can't go for symfony 2 (it needs 5.3.4) so is it a smart move to go for symfony 1 now that the version 2 is out ?
  • We are in shared hosting (going to a dedicated server is not an option for now, we don't have the money for it), won't symfony 1 and yii ask for too much ressources (I'm more worry about symfony 1, from what I've read) ?
  • Some of the websites contributors are not really experienced with php / MVC frameworks : once the structure of the website will be converted to one of these 2 frameworks, will there be difficulties for these contributors ? Spending 2-3 days to discover the framework is OK, 2-3 weeks is not. I've read that yii has less tutorials (but complete documentation) than symfony but this last one is more difficult to understand.

Please no answer like "this one is better", ideally someone that would have use the two frameworks recently.

1
  • I've been using symfony 1.0-1.4 for the last 3 or 4 years with lots of shared hosting providers with any problem... The only thing to worry about are shared hosting environments which forces you to install everything in the document root, but there's enough documentation out there. Also it relies on running cli commands for some tasks (cleaning cache, etc) so you need either ssh access or installing some plugins which lets you run those administrative tasks from a web interface (well, you can clean the cache by deleting the cache files from ftp too, of course). May 6, 2011 at 8:54

4 Answers 4

15

I'm extremely late to the game here, but it's kind of relevant because Symfony2 is actually stable and in use. I struggled to get Symfony2 working for a week and a half on a work dev box running CentOS 5.6 VPS (with a relatively locked down configuration, but I can sudo).

Then I quit because the "Agile Development with Yii" and "Yii Cookbook" I had ordered a few days earlier had arrived, and I thought to myself "nothing could be worse than this headache". Basically, there was all kinds of issues with git and Symfony's console depending on it (I think). I was just trying to play.

Then I started playing with Yii. I designed my db very carefully, checked out the extensions, including the bada$$ bootstrap extensions, and basically my entire app was done in about 48 hours, and it included a 10 table db, tons of data, and fairly complex user permissions, etc.

Piece of cake. I don't really see the advantage of Symfony2 other than the fact that it's going to be the backbone of Drupal 8, if that's the kind of thing you're into. :)

Oh, and not only did Yii make it easy to build the app, it made it easy to make me look like a ROCKSTAR. Total jQueryUI integration (in addition to Bootstrap - which is responsive by default, so I don't even have to worry about that crap). All data is delivered through portlets and widgets that are super easy to use.

I couldn't recommend Yii highly enough. It's the bomb.

1

symfony2 is not out yet. it's no more preview but its still beta.

to point 2; depends whats your limits in php (e.g. memory limit) symfony has by the way a nice caching strategy, so it shouldn't be a problem.

as you mentioned, theres no answer like "a or b is better". but you should check if you are able to run those frameworks on your shared host (sometimes its a bit bitchy to set up symfony on shared hosts).

3
  • Memory limit : 40M. We don't have (for the cache), memcached or APC. May 6, 2011 at 9:26
  • For both Yii and Symfony APC and Memcached are highly recommended. I would consider switching to another host or small VPS.
    – i.amniels
    May 6, 2011 at 11:40
  • I know but for now it's not an option...if we reach the point where we cant' handle more visitors we will switch to an other hosting solution with APC and memecached. It's something I have in mind for the future (as in a few months) May 6, 2011 at 13:45
1

As i have not use Yii i cannot make a comparison there. However if you go for Symfony 1.xx now that S2 is out, which you cannot use because of the php version, there is a limited support life to be taken into account. Sensio say November 2012 but support and fixes may well tail of as S2 gets more traction. It doesn't mean it will disappear of course but you need to weigh this factor into your decision making.

1

Noting your requirements, a heads up that Symfony2 needs PHP 5.3.2.

http://symfony.com/blog/why-will-symfony-2-0-finally-use-php-5-3

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.