Today one of my readers asked me following question via e-mail.
“Which is the world’s best PHP framework in these days which have all the features, fast, robust, everything and developer using that can develop very good web application.
Second i want to know what is better for a web application using any frame work to develop it or just start it from scratch using PHP. Because some suggest that direct codes writing is better than using any framework.”
I choose to answer it here:
If I have to give one word answers then I would say “depends”. Yes! It depends on the project requirement. There is nothing like “better framework”. Every framework has its own set of problems it solves. It is only a matter of what framework suites my requirement or much near to my requirement.
May be a CMS like joomla or drupal be very promising than framework for some projects, then I would say just go ahead & use it. Let me put some of my experience about here.
One of my customers was in need of data entry system which is fast and has a good UI. That’s a primary requirement. Of course it would have few custom form fields and validation logic. It would also have some user management & role based activity. Now I have a 3 options – content management system, framework, or code from scratch. Let me take them one by one.
Generally, content management systems (CMS) are built for a purpose. Like wordpress for blogging, joomla/drupal for general site management, moodle for learning management, magento for e-commerce retail etc. I don’t recommend customization to the extent that they work completely different from what they are built for. Best example is building a CRM with wordpress..That’s difficult to imagine..However some people do…
Next coming to framework, there are many frameworks out there in the market. Which one to choose…all give almost the same functionality….all are based on MVC concept…with all these you find confusing market and finally struck up to make a decision. By my experience below is the framework ordered by the size of the project they may suite starting from small to big
CakePHP > CodeIgniter > Symfony / Yii > Zend
Above order is just based on one factor. Your order may be different – that you have to discover over the period of time. One of the factors I see considering the frameworks is their level of expertise. You may not have used codeIgniter before and have used symfony in many previous projects then symfony may take the position of codeigniter.
Most of the projects must fit into above two…if not, code from scratch may be the best solution. However this is very rare case. Even if one does so, eventually they end up arranging and including the existing PHP classes in a semantic way. The world is in fast motion. Any one can’t easily afford to reinvent the wheel.
By above last two sentences I don’t dictate that no one scratch from the code. Yes! Few companies do. When you code something from scratch you have more control on the code base – that’s the advantage few big companies want to have.
Coming back to choice I have to make for my client project…I may consider CMS first, but since the project has very custom fields & validation I would just don’t go with it. I don’t want myself ending up in too much of customization. Next would be framework choice. Here I ask myself about the complexity of the project. A data entry system will not be too complex, even a CakePHP can suit my requirement. But the project may extend in future, so I would choose codeigniter. Here my journey of choice ends! Definitely I don’t go from scratch – I don’t have good reason to do so.
This has become a long post by now, will finish this giving a last one example. Say my client need a social site like Pinterest. Now neither CMS not framework may suite my requirement. Also the concept of the project is new – we definitely don’t know the future of the project. In this case I would choose to develope from scratch.
That’s being said, I have one statement to make “There is no best framework in the world. Framework are meant to make your job easy. If they do so, then they are the best”
2 comments for “Which is the best PHP framework these days?”