Best PHP Framework?
July 28, 2012 6:38 AM   Subscribe

Which PHP framework is the most straightforward to pick up for an beginner / intermediate programmer?

I know enough PHP to have created a site for a film society which allows them add / delete films from a database. There is also a season system, ratings system and they can upload stills. The code works, but has been cobbled together over the past few years and I would like to update it and teach myself a framework whilst I'm at it.

I dabbled with CakePHP a year ago and didn't get very far with it. Should I persevere with it or is there another framework that offers me what I need and is simple enough to pick up quickly and suitable for a small project.

For info I have no problems with SQL, HTML & CSS to complete the other parts of the project, it's just the right framework I need to find.
posted by jontyjago to Computers & Internet (7 answers total) 9 users marked this as a favorite
A friend who taught herself PHP - with no previous programming experience - is now using CodeIgniter quite successfully to make some pretty sophisticated web sites. I'm a more experienced programmer, and I'm pretty happy with CodeIgniter too.
posted by moonmilk at 7:37 AM on July 28, 2012

I'm biased, but I would consider revisiting Cake. Of all the frameworks I've tried, it seems to be the best productivity-wise and has (again, imo) one of the more scalable APIs (that is easy for easy stuff, but scales up to support more complicated stuff). There is also a lot of codified wisdom online, and so googling around for help will yield a decent haul of results. (But then, the same is true of Zend and Code Igniter.)

But, whatever you end up choosing, web programming is really a (fairly complicated) system integration problem. You're bringing together some pretty disparate parts--MySQL, PHP, JavaScript, HTML/CSS, client/server architecture, event-driven programming--all together into a seamless whole that works with any browser. Non-trivial. As a result any framework is going to have a somewhat complicated API and a lot of moving parts (and lots of files to keep track of). And since they're trying to solve pretty much the same problem, they all kind of end up looking a lot alike in terms of basic architecture.

Since you've tried Cake before (and didn't like it? there is a new version 2.0, btw) maybe install a couple of other frameworks that people suggest in this thread, implement a simple application in all of them, and see how intuitive they feel, and then make your decision. That's kind of what I did and I ultimately settled on Cake. Hope this helps!
posted by skye.dancer at 8:50 AM on July 28, 2012

Since you're relatively new to php frameworks, the availability of documentation & user communities is an important variable to consider. Cakephp and codeigniter are quite strong in this regard, although much of Cake's info is for 1.x users, despite 2.x being a more logical system (in my opinion). For me, codeigniter was more enjoyable to get started with, but I very much prefer CakePHP once a project kicks into gear.

Although its a CMS, I find Drupal to be quite good for making sites that are largely updated by non-programmers. The learning curve is kinda rough, but my clients like the results, and it's an in-demand skill right now.
posted by yorick at 9:01 AM on July 28, 2012

I've been messing around with Laravel as of late, and it's pretty great. Easy to read, easy to write, and very descriptive. It also uses PHP 5.3 concepts like anonymous functions, so that's something to keep in mind. The documentation is excellent - much better than other frameworks like Kohana or Fuel.

Cake is also a pretty good choice, though its extensive use of arrays in a PHP 5.2+ world feels a bit antiquated. For most basic stuff, though, I'd say it's fine.
posted by gchucky at 12:10 PM on July 28, 2012

Drupal is a good way to go because you can build a site without having to do much programming, and then when there is something that Drupal doesn't do you can just write a very small module to fill in the missing pieces.
posted by Space Coyote at 1:51 PM on July 28, 2012

People in the PHP space tend to use code igniter or Kohana (which was spawned from CI?)
posted by mattoxic at 8:29 PM on July 28, 2012

When I was at the point you are in learning PHP, I had a good experience with CodeIgniter. (I had even tried CakePHP and struggled, too.) It has good documentation (and I found these video tutorials really helpful as well) and it has the least amount of built-in features.

That means that you probably won't want to stick with CodeIgniter long term--other frameworks like FuelPHP (which I have been using lately) or Laravel or Cake have a lot of commonly needed, time-saving functionality built in, things you will have to find and install yourself if you want to use them in CI, and they also use features from newer versions of PHP. But the lack of that stuff in CodeIgniter, and the ability to just add the libraries you need as you realize you need them, is what makes it much easier to learn when you are new to using an MVC framework.
posted by firefleet at 12:10 PM on July 29, 2012

« Older tough mp4 video camera   |   What kind of doctor can help diagnose my issue... Newer »
This thread is closed to new comments.