top | item 5189181

PHP frameworks: Which would you pick and why?

11 points| robomartin | 13 years ago | reply

Can't post this on SE/SO because it'd get shut down in a second.

I need to adopt a PHP MVC framework. I've done a bunch of PHP MVC work myself. Now I want to break away from reinventing everything and take advantage of a framework. This, of course, is for more than just MVC. Frameworks can offer solutions to such things as user authentication, forms, etc. that might be of value.

In addition to this, I need to get a mid-complexity MVP done in about ten to fifteen days for a presentation. I'm a quick study and already have chunks of the project coded, so part of it will be refactoring.

I've been looking at ZF2 primarily but Yii keeps coming-up here and there. Interested to learn what HN might have to say about these and the other choices out there.

Context without letting the cat out of the bag: A site where members place orders (and pay) for services and service providers sign-up to offer these services. Free and paid memberships. Ratings system for both service buyers and providers. Lightweight chat and maybe forum/s. English only at first but i18n will probably be a must later-on.

20 comments

order
[+] heldrida|13 years ago|reply
Hi, I'm pretty sure this was discussed like zillion times before in HN. So, without having to go much longer, I suggest you to give a look in Laravel http://laravel.com/

Do a good research about what's new in this project, you can even find comparisons with Rails, Django and so on :)

Good Luck!

[+] hyuuu|13 years ago|reply
I am using laravel right now. Great community, amazing framework, and the performance is at one of the top 5.

The one that really gets me is their ORM, so elegant. It is still being actively developed and it's already stable and production ready, they just released version 4 (I'm not sure) check them out :)

[+] laurencei|13 years ago|reply
+1 Laravel. I've switch over from Codeigniter - best thing I ever did. So much community activity. Amazing amount of development occurring. It is really pushing the boundaries, yet giving a really good elegant framework to use.
[+] robomartin|13 years ago|reply
Laravel never came up in any of my googling. Watching the screencasts right now. Thanks.
[+] joshstrange|13 years ago|reply
I am using Laravel on multiple projects right now and LOVE it.
[+] krapp|13 years ago|reply
Bonus points - you can use it with Twig too.
[+] jfaucett|13 years ago|reply
I'd say go with Symfony2 or Laravel, from my experience as far as php frameworks go these are the best. Though I would suggest you consider going with something besides php if you're thinking more longterm on the MVP. Sounds like an ideal situation for rails IMHO.
[+] ebangham|13 years ago|reply
I'd say go with Laravel. Nothing in the PHP world provides it's level of convention over configuration with such an easy learning curve. The up and coming version of Laravel called Illuminate, is seriously upping the ante. It's bringing an insane level of modularity that gives you the ability to hot swap core framework components in a manor similar to Ruby on Rails' Railties. I used to hate PHP, then Laravel came along and that all changed.
[+] robomartin|13 years ago|reply
Well, I am actually considering going with Python or Node.js for phase 2.
[+] xackpot|13 years ago|reply
When I decided to rewrite my webapp, I considered switching from GWT front end and php backend to an MVC framework. I wanted to try django so I started re-writing my app with it. But I found the learning curve to be too steep and I didn't want to spend the amount of time I was spending learning Python and Django. So I gave up and tried CakePHP, Symphony, CodeIgniter. I found CakePHP and Symphony to be difficult to set up. I may have done something wrong, but eventually when I started with CodeIgniter, everything seemed like a breeze.

So CodeIgniter seems to be the best for me.

[+] huherto|13 years ago|reply
We are also considering Code Igniter. But it seems a little outdated. It doesn't take advantage of some of the new happenings in PHP. Composer, Autoloading, Monolog, and Unit testing. using PHP Unit.
[+] mattm|13 years ago|reply
I've used Zend Framework v1 and Yii for at least a year each on different projects. Zend Framework has a steep learning curve but is great for larger applications as the code is well thought out. If you need to build something quick though I wouldn't recommend it.

Yii is not bad. I prefer Zend over it but for getting something up quick it would be a good choice.

[+] pedrofornaza|13 years ago|reply
I dont think its a good idea discuss what frameworks to use.

I usually choose the better framework FOR MY PROBLEM. If i need something lightweight, or reliability, performance, etc.

ZF and Symfony are too big for small projects, maybe Slim is to little to a medium/big project, etc.

I think you adopt a PHP framework for your problem, not for coding in general.

[+] jamesaanderson|13 years ago|reply
I'm a fan of Laravel and FuelPHP and if you're looking for a micro-framework take a look at Silex.
[+] bithai|13 years ago|reply
Try Yiiframework! I started with CakePHP, Codeignitor, a bit of Zend. Found Yiiframework.com for all projects now.

They have matured fast, conventions that makes sense to me. Its like best of different php frameworks.

You can still use Zend libraries in any other MVC php framework.