Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PHP Frameworks - Are they solely personal preference?

I'm new to the world of PHP frameworks and, after some initial investigation, came up with the following list of popular choices:

  • CakePHP
  • CodeIgniter
  • Symfony
  • Zend

I'm trying not to repeat the "Which is best?" question, which seems to elicit not much more than personal preference. Is this the case? Is one truly "better" than the other? What are the strengths and weaknesses of each?

I apologize if the question is too broad, but any clarification would be much appreciated.

like image 237
Colin Brock Avatar asked Dec 08 '08 16:12

Colin Brock


People also ask

What is the purpose of a PHP framework?

A PHP framework is a platform to build PHP web applications. PHP frameworks provide libraries for commonly used functions, which helps to cut down on the amount of original code developers need to write from scratch. A PHP framework provides a basic foundation for the development of web applications in PHP.

Is it necessary to use framework in PHP?

With even a simple PHP framework, you can simplify the coding process, speed up app development times, and make your website easier to maintain in the long run. If you're looking for an efficient app and web design approach, even for beginners, you should check out PHP frameworks.

Which is best framework of PHP and why?

Laravel is a well-known PHP framework that is noted for its free, open-source PHP framework. It has many features and functionalities built-in, making it a good tool for customizing complicated projects. User authentication, session management, and caching are among its features.


2 Answers

The thing with frameworks is that they're perfect up to the point you need them to do something they're not made for.

I've worked with all of the major PHP framework's you've listed, except Zend and this is what I can quickly tell you:

  • CakePHP enforces OOP, gets you up and running quickly, has a great community and relatively good documentation, comes packed with all the features you'd come to expect.

  • CodeIgniter gives you the most elbowroom of the first three. Doesn't exactly enforce OOP, it leaves it up to you. The easiest to implement and distribute of the three. Fantastic community and they keep the documentation up-to-date with new releases. I like to consider it as a perfect skeleton for whatever you want to do, how you want to do it. Also, the most fastest of the three.

  • Symfony without a doubt, the most powerful of the three and the closest to RoR. Expect having to learn PEAR and have access to SSH on remote servers. Very slow and I wouldn't suggest it on shared hosts if you want to develop a big application. It does enforce some strange practices and you'll see more PHP in your views than you'd particularly rather like, but it has a tool to help you start working on a solution for every problem.

like image 77
Filip Dupanović Avatar answered Sep 28 '22 02:09

Filip Dupanović


I stumbled across this (old) question as I am looking for a PHP framework that works well in a shared hosting environment ; speed is important as in shared hosting CPU time is the tightest constraint.

like image 25
Tramov Avatar answered Sep 28 '22 00:09

Tramov