Which PHP Framework to choose?

c10n3d_0r6

Senior Member
Joined
Nov 1, 2005
Messages
627
Reaction score
12
I'm working for a company creating and managing mostly Wordpress and Joomla powered websites. We are considering moving into the software development market, creating PHP based web applications. What framework would be a good choice to adopt? None of as have any experience in PHP frameworks besides some fiddling with CodeIgniter and CakePHP.
 
Symfony's quite fantastic. Drupal 8 is incorporating some of it's components.
 
Spent many years with CakePHP and CodeIgniter. I've done some work with Zend, Symphony and find them slightly bloated (CakePHP included) and poorly documented (looking at you Zend)

I've recently switched to Laravel 4 and am loving working with it. It utilizes many of Symphony's components as well as other established open source components. It takes advantage of the newer PHP language structs; closures, traits, namespaces come to mind. It also utilizes composer making dependency management and bundles a breeze.
 
Spent many years with CakePHP and CodeIgniter. I've done some work with Zend, Symphony and find them slightly bloated (CakePHP included) and poorly documented (looking at you Zend)

I've recently switched to Laravel 4 and am loving working with it. It utilizes many of Symphony's components as well as other established open source components. It takes advantage of the newer PHP language structs; closures, traits, namespaces come to mind. It also utilizes composer making dependency management and bundles a breeze.

I've heard great things about Laravel, must check it out soon :)
Silex is nice too, a kinda stripped down symfony2
 
And that's supposed to read Symfony, iOS autocorrect fail :)

We're busy porting a relatively high traffic e-commerce site from CodeIgniter to Laravel, will let you know how things go.

Haven't heard of Silex but will definitely give it a look.
 
Don't really see the point in using a *EDIT: free* framework to start off with...

I'd say choose staff that truly understand and code PHP, HTML, CSS, MYSQL, JQUERY and are able to implement the various features /requirements on an as needed basis... Quality staff... Instead of ones that dabble with wordpress and joomla and claim to be web developers... The only thing you end up with, is bloat.

It's just my opinion but understanding CakePHP or any other framework back to front is not going to make you a good developer as you are constantly living within that box and those ideas.

Make your own CakePHP, one that works for you and to your own requirements:

http://php.net/manual/en/index.php
http://dev.mysql.com/doc/refman/5.6/en/
http://www.stackoverflow.com/
http://www.sitepoint.com/forums/

Time spent on this will produce results 100x that of the time you would have spent learning a framework...

<?php
$content = '
<p>The Results:</p>
';

$yourOptions = array('CakePHP' => rand(1, 6), 'RealPHP' => rand(7, 9), 'OtherFrameWorks' => rand(1, 6));

$comparison = 0;
foreach ($yourOptions as $optionName=>$optionValue)
{
if ($optionValue > $comparison)
{
$comparison = $optionValue;
$TheWinner = $optionName;
}
}

$content .= '
<p>Winner: '.$TheWinner.'</p>
';

echo $content;
exit;
?>
 
Last edited:
Don't really see the point in using a framework to start off with...

The thing is, we all know how to spagetti code things together. the main advantage i see of using a framework is how it handles the multitude of errors that can pop up in code that you will not necessarily forsee and therefore will not catch and handle properly.

I have seen a lot of sites that have errors (a few of mine included) which are clearly coded manually,most commonly looping errors when it comes to arrays and database records. The framework, although will not stop this altogether, will tend to handle the errors better
 
Not using an existing framework of some sort on some project, regardless of language is one of the dumbessed things you can do.
All projects have deadlines and budgets. Working is about make profit. You make more profit getting work done under budget and ahead of schedule. If you want to waste your time and money writing front controllers, view resolvers, connection pools etc, go ahead, but I can pretty much guarantee that your "amazing self coded" MVC framework will be a piece of **** compared to Laraval, spring MVC, etc
 
Last edited:
Not using an existing framework of some sort on some project, regardless of language is one of the dumbessed things you can do.
All projects have deadlines and budgets. Working is about make profit. You make more profit getting work done under budget and ahead of schedule. If you want to waste your time and money writing front controllers, view resolvers, connection pools etc (which will, contrary to opinions, not work as well, or in other situations) go ahead

I was not suggesting that no framework should be used... I suggested simply that in terms of development, it would be better to create your own framework, one that you can understand and modify to meet your requirements... One that implements only the necessary amount of functionality needed to match the requirements.

You're talking about deadlines and profits... I couldn't agree more with what you are saying but with something that you have created, understand and know how to use 110% the amount of productivity that this can achieve will far outweigh what could have been achieved relying on someone else's work. If you have the staff with the skill set to match your requirements then maintaining a collection of classes and functions to assist your world is not this time consuming issue that you are making it out to be...

Sure, on the other hand if you have substandard staff, you get substandard results which would negatively affect your productivity but this is not part of my statement at all... Quality staff, ones that can manage and apply these tasks, properly, where necessary and this is what i am talking about. I think by saying that if i go and write code to handle an event its going to be not as good as the one written in CakePHP, etc... Well, that's just a load of rubbish because the owness is on you to make sure that you understand the standards and requirements relating to these processes and implement them correctly and if you or cannot get than right then you do not belong in the same category as developers that i would call quality. And if that is the case... Then sure, go ahead and use your CakePHP.

I guess my debate is one of quality or quantity... Sure you can make more sites using freely available frameworks, however, the functionality relating to this will not differ and u will be forever, trapped in that box. Take the time to learn and develop your own solutions and you will be able to accommodate for whatever the demand presents its self to be.

As for your guarantee, whois to say that our implementations are not reconfigurations of parts of these frameworks to start off with? I think with all that you have said so far... To me... Your guarantee is worth about as much as your opinion because it is based on your own preconceived notions about this subject.

Its like i said, the owness is own you to ensure that what is produced is up to standard and that this is maintained accordingly. If you're debating that holding a customized set of functions to deal with the various requirements that you commonly face is not as effective as using a freely available framework, then obviously you have not taken the time or the effort to stick to the standards in the first place and this is why you have this opinion that the code that can be produced diy is less effective and will not work as well...

Because yours didn't? Well shame but not everyone has that problem... Some people have taken the time to understand fully what it is that they are trying to achieve and have managed to achieve it, effectively and without ending up with sub-standard work!

EDIT: Thought for today... Why was PHP even created in the first place? Because the creator was stuck in the box of the other frameworks available, needed something to accommodate for his own requirements in his own specific way... Look at Ruby, look at Perl... Its all the same over and over and over again and this is what makes the technology evolve... Don't be trapped in the box... That is all.
 
Last edited:
The thing is, we all know how to spagetti code things together. the main advantage i see of using a framework is how it handles the multitude of errors that can pop up in code that you will not necessarily forsee and therefore will not catch and handle properly.

I have seen a lot of sites that have errors (a few of mine included) which are clearly coded manually,most commonly looping errors when it comes to arrays and database records. The framework, although will not stop this altogether, will tend to handle the errors better

One statement for you. Standards were not followed. The code that was written was not written correctly in that you did not accommodate for the various occurrences that have now produced these issues... Yes using a frame work can help to minimize this but my point is simply put... Quality staff... Ones that understand the processes and standards involved and implement them correctly... You need an extremely logical person in order to write code correctly... EXTREMELY logical.

I do understand what you are saying and i'm not arguing that you are wrong because you are right... But my point is that is you had followed the rules correctly, there would not be these errors in the first place and with that taken into consideration, what is the need for the framework that you mentioned now? With its million options that you likely do not use / need.
 
I think there is value in both approaches: using a 3rd party Framework or just custom PHP/own framework, depending on the complexity and requirements of a project and the expertise of the Developer/Team.
On one hand, a Framework provides, as mentioned before, consistent error handling and logging. Additionally most Frameworks will also provide solid reusable components, implementation of well known design patterns (such as MVC, front controller, factory pattern, builder pattern, singleton and other) and an easy and consistent way to extend an application. Altogether, it will allow efficient and rapid application development.
On the other hand, there is an investment in time required to master a Framework, you are bound to a certain way of doing things, and since technology is ever evolving, you require that Framework to also continuously evolve. If the Framework is abandoned you might have to consider moving to a different one, or maintaining it yourself. Since most frameworks are open source one could argue that the risk of hacking is higher, since it is possible to study the code and learn how to exploit it.
So, there are costs and risks to consider.
For instance, users of the (arguably) most popular php framework (CodeIgniter) must be worried with the announcement that Ellis Lab is looking for a new owner for the Framework: http://ellislab.com/blog/entry/ellislab-seeking-new-owner-for-codeigniter
An experienced Developer/Team would also be able to implement reusable components, design patterns, etc but it takes time to develop and throughly test all that code, and the code needs to be maintained. They could choose to go that route, or to choose a well established Framework, which they understand well. From the ones I have tried, Yii and Zend are robust and give security high priority (I have not tried Laravel yet).
But granted, none of the Frameworks is intended to replace high quality software developers.
 
I think there is value in both approaches: using a 3rd party Framework or just custom PHP/own framework, depending on the complexity and requirements of a project and the expertise of the Developer/Team.
On one hand, a Framework provides, as mentioned before, consistent error handling and logging. Additionally most Frameworks will also provide solid reusable components, implementation of well known design patterns (such as MVC, front controller, factory pattern, builder pattern, singleton and other) and an easy and consistent way to extend an application. Altogether, it will allow efficient and rapid application development.
On the other hand, there is an investment in time required to master a Framework, you are bound to a certain way of doing things, and since technology is ever evolving, you require that Framework to also continuously evolve. If the Framework is abandoned you might have to consider moving to a different one, or maintaining it yourself. Since most frameworks are open source one could argue that the risk of hacking is higher, since it is possible to study the code and learn how to exploit it.
So, there are costs and risks to consider.
For instance, users of the (arguably) most popular php framework (CodeIgniter) must be worried with the announcement that Ellis Lab is looking for a new owner for the Framework: http://ellislab.com/blog/entry/ellislab-seeking-new-owner-for-codeigniter
An experienced Developer/Team would also be able to implement reusable components, design patterns, etc but it takes time to develop and throughly test all that code, and the code needs to be maintained. They could choose to go that route, or to choose a well established Framework, which they understand well. From the ones I have tried, Yii and Zend are robust and give security high priority (I have not tried Laravel yet).
But granted, none of the Frameworks is intended to replace high quality software developers.

Perfect answer!
 
Something to keep in mind is a framework's community. Is the documentation, examples, and community of active users/developers big and friendly? Laravel is a decent PHP framework with a good community.

The move to Laravel 4 was an interesting one. I'm not convinced it was better, but it is certainly a bit cleaner than Laravel 3.

Kohana is another decent framework. But I have not used it for a while.

Also, it is worth noting that many web apps are a combination of back-end server and front-end client. You may want to spend as much time choosing a front-end framework (Angular.js or Ember.js for example) as you are for the back-end.
 
Wouldn't recommend re-inventing the wheel. There is no way you are going to be able to do a better job with a framework than what is already out there.

Going with PHP in my opinion is a mistake in any event. There are far better options available for Ruby and Python for instance. And that way you get to use an actual programming language. Using PHP to write any reasonably complicated application is like writing a 3 hour movie script in funigalor.
 
Top
Sign up to the MyBroadband newsletter
X