Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Ask HN: What PHP frame work is best?
4 points by thatusertwo on April 29, 2011 | hide | past | favorite | 13 comments
I've been asked to pick a framework for the development of a pretty big project (3 Month or so). PHP is the chosen language, but what framework should we go with? My professor seems to be suggestion CakePHP or codeIgniter.



I've been using CakePHP on an existing project (Cake was already in use) and it does not completely suck. It provides the normal, useful MVC abstractions, an interesting way of integrating non-Cake libraries, and decent updates (on the 1.2.10 release as of last week).

Having said that, Cake does not enforce separation of business and display logic like the Django templating language does. Unfortunately, my predecessor took great advantage of this, defeating much of the purpose of MVC.

All in all, I like Django better, but CakePHP gets the job done.


Drupal is a great framework and much more. IMHO using something like Drupal is a higher order of development and we should be building with the bigger pieces that such a tool provides rather than having religious wars over languages. Sure language X or Y may be more elegant or faster at building feature A but feature A has been built over and over again. So why not build on top of something that already provides commodity feature A and concentrate on building the unique features?


PHP frameworks are lame. Seriously. PHP is simple enough that you don't need a framework. None of the frameworks are very well maintained. All the frameworks are more trouble than they're worth. Later on, you will end up spending more development time getting away from the framework than you did implementing it.


The claim that PHP frameworks are not well maintained is completely unfounded. Are you going to seriously say that Zend, Codeigniter, Symphony are not maintained?

The claim that they are more trouble than they are worth is also a common misconception. Yes, in some situations for very small projects, frameworks are probably unnecessary, but it really helps to not reinvent the wheel when it comes to security, form validation, database management, caching, and any of the other repetitive things that frameworks try to standardize.

I'd recommend taking a look at Codeigniter, I've been using it in production for 2 years and have completely enjoyed it. It is very well documented easy to use, and flexible... and since it's been opened up to the community with the codeigniter-reactor branch there is much more development taking place.

I've also started working some with FuelPHP http://fuelphp.com/ which is a new framework but also very well documented and makes great use of the features php5.3

I wouldn't recommend CakePHP though. From what I've seen it is bloated and tries to do too much auto-magically (like rails) but fails to execute as well.


i think you'll have to back up your statement more than that. Symfony2 and other frameworks that require php 5.3 seem to be quite well maintained.


The only thing a framework does is give you new functions to call existing PHP functions. That slows down everything down and results in shoddy junk code. In over 10 years of php development, I have yet to see a single real-world case where using a framework was better than just directly writing lean php code.


Real world situation, you decide to move your database from mysql to postgresql because you're unhappy with something that oracle is doing and you want to move to a database that is completely free and open-source.

Using a framework, you change the $config['driver'] from "mysql" to "postgres" and you're good to go.

Without using a framework, you need to change every query your application makes. Good luck with that. If you don't have to do that because you standardized it yourself with a bunch of functions then you actually are using a framework, just one you made yourself rather than an open source one.


Isn't that what PHP does to C and C does to assembler?


I've been using Kohana for about a year now, and I'm really liking it.

http://kohanaframework.org/

Supports 5.2+ only, nice ORM, and has a cool autoloader system that I really like. Make sure you have an opcode cache in production though :-)


My opinion is that one should set a requirement on php 5.3 as a baseline. if it doesn't match that skip it.


Depends on the project

clickable: http://www.phpframeworks.com/


Can you give some more info about the project?


Its sort of a job site.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: