Which PHP framework holds a promise for the future?
I thought I'd throw in a question for a change! As I'm quite sure at least some of my readers are skilled PHP developers, some of them might be able to throw in some insightful remarks when it comes to the future of PHP5 and frameworks.
I guess most developers will agree on this one: We're all getting sick and tired of writing so-called 'plumbing code'. It's a boring, tedious and flat out annoying job to write CRUD classes (Create, Read, Update, Delete) over and over again when developing web applications. Other boring things are form validation, input filtering, database abstraction layers and complex presentation layers. Then there's AJAX. Most of us like it, most of us want to do it but very few of us like to write hundreds of lines of javascript code.
The folks who came up with Ruby On Rails were right on the money when they came up with their framework. This thing eliminates most of those shitty tasks no one likes to perform.
So, no matter how nice Rails may be, suppose you want to stay inside the PHP arena. There's at least three frameworks that I know that seem to hold some promise for the future. The big question is: Which one to use? Choice can be nice but sometimes it just isn't. This is another nice thing about Rails. There's no need to choose between different frameworks. If you're going the Ruby Route you'll be traversing it on Rails. Not so for us PHP5 folks. What have we got?
- Symfony: A very interesting looking framework indeed. In addition to that it seems to be VERY well documented. It also has a full blown real world example application with a very elaborate 'How we built it' tutorial.
- WASP: Another PHP5 based framework I've heard some nice things about. There's however a lot less to read about this kit.
- CakePHP: yet another framework that looks nice. There's some nice showcase sites too.
All of these frameworks more or less share the same goals. They try to take away a lot of 'plumbing code' and other boring tasks I mentioned earlier. Which one to choose doesn't seem all that obvious though. Therefore I figured it would be nice to ask this question to my readers:
Which PHP5 framework do you prefer (or better: you're already using it) and why?
I'm interested in your thoughts!
Filed under: programming
Number of comments:
Number of trackbacks:
Tagged with: 







At 23 February '06 - 04:57 pcdinh wrote:
Pipeline http://www.livepipe.net
Solar http://solarphp.com
At 23 February '06 - 06:11 Bernard wrote:
At 23 February '06 - 09:07 Nicolás Granelli wrote:
At 23 February '06 - 14:32 Chris R. wrote:
Actually seagull is worth a mention too.
The only thing bothering me is that none of these frameworks are actually out of beta stage yet. Cake looks good but is still hovering somewhere below the version1.0 treshold like most other frameworks.
At 24 February '06 - 11:02 Todd Tomlinson wrote:
While there are a number of frameworks out there that look interesting — remember to look at their licensing requirements!
At 26 February '06 - 09:56 Olle Jonsson wrote:
Since the code has been under heavy flux (read: fast development with bold changes during the pre-beta and beta stages), there is still room for improvement when it comes to documentation. The community is at work, discussing and implementing ways to make better documentation, and involving more users in making it.
Making Cake a better framework is a pretty low-threshold thing to do. It is a healthy open source project, I think. Not a closed board-room.
And it takes a lot of time out of developing web applications. You still need to know PHP, and you still need to know your domain, you still have to program. But the maintenance part is way easier.
I’m happy Cake came into my professional life when it did. I was ready for a PHP framework, and I have been productive with it.
At 28 February '06 - 17:21 h3 wrote:
I don’t think there is a “one size fit all” solution for frameworks, at some point there is to much features, and the needs are too differents to be put in a “one solution” for all. Plus. you cannot point out a framework saying “hey, this is the best framework ever!”
But, there is indeed good and bad frameworks. Good framework distinguish themselves by being light (non-obstrusive) and expandable. A framework should be considered as a coder’s toolbox, you pick up the tools you need to get the job done, that’s all. If you want something which get the job done for you whitout coding you better look for a CMS or a pre-made solution than a framework.
Personnally I code php for websites but also for web application which are meant to be run in a closed environement in long therm. I don’t really use a “framework”, I prefer using my own code which I reuse. Why rewrite ? If you had write it well once then you just copypaste it.
It might sounds weird or stupid, but if you think about it, when I write a piece of code, its to perform an X task. And if, to accomplish that X task, I know and understand exactly what code gets loaded and what it does, I can be sure that if there is a problem I can fix it and quick.
I think it’s more a feeling and fashion question than a good framework or language question. Both PHP or Ruby are robust and powerfull language that we happily use ~10% off their real capacities, and both have their goods and bads. The question is, which are you most comfortable with ? which will be still used in 10 years ? And ever keep in mind that it’s not because the language is “better” that it will be still in the market in 10 years from now. If it were like that, this discution would probably be about LISP frameworks instead of PHP or Ruby frameworks (LISP is now 58 years old..).
I think that too much programmers choose their languages based upon “how easy” it is to learn how to get trendy results. I fact.. I fear mental lazyness.
At 01 March '06 - 02:53 Marco wrote:
I can guarantee you I can whip up a totally over the top Web 2.0 style site with every possible bell/whistle in it with crap procedural code and 5465 separate .php scripts with no structure or whatsoever. That would be a totally trendy result but there would be absolutely nothing ‘trendy’ about the code
At 01 March '06 - 15:17 h3 wrote:
“quick” would be a more appropriate word i think. Sorry about the confusion.
Anyway, that wasn’t really my point.. The point is; Ruby is not better than PHP.. like PHP is niether better than Ruby. And a framework should not be a key feature to look for when choosing a programming language. Frameworks are not a language, there are set of usefull and often used functionality grouped to save time. A smarter framework does not make the language better, since in theory you could replicate that framework in whatsoever equivalent rival language.
The bottom line is that it’s not the frameworks and often not the language neither that make the difference, it’s the coders that use it and how they use it.
At 02 March '06 - 02:51 Marco wrote:
However, given the fact I choose PHP there’s simply several frameworks out there that try to make the life of a PHP developer somewhat easier. And that really CAN make a difference I think.
At 02 March '06 - 14:40 Ryan wrote:
If you like Ruby check these out.
http://phpontrax.org/
http://biscuitproject.tigris.org/
Both are supposed to be like ruby on rails but in PHP.
At 09 March '06 - 14:27 Lee Queen wrote:
At 11 March '06 - 15:18 Erlend Klakegg Bergheim wrote:
At 19 March '06 - 06:38 Frankie Robertson wrote:
At 21 March '06 - 17:56 h3 wrote:
It takes 4 lines and about 30 seconds to install and integrate, which i think is pretty impresive.
shell:
pear upgrade -fo pear
pear channel-discover pear.mooexpress.com
pear install mooexpress/prado
yourFile.php:
require_once(‘prado/framework/prado.php’);
I think I’ll give it a try ;)
At 22 March '06 - 15:21 Ilija Studen wrote:
And there is a Z word in front :)
At 23 March '06 - 10:45 Ivo Jansch wrote:
At 24 March '06 - 06:07 Ibrahim Ahmed wrote:
Of course the main features PHP needs to steal from Ruby is metaprogramming, closures, strict object orientation.
But then again, may be Rails excels as a framework, because it’s implementation is coherent with the philosophy and features of Ruby. I mean, during the last 5 years, PHP frameworks was always trying to copycat other languages frameworks, without asking if this framework would really work the same if it’s ported to PHP. If you know what i mean.
Anyway, i took a look at http://agavi.org you may like this one.
I already added Rails to my toolchest, and i am really happy with it, though i like PHP, but till a convincing PHP framework arises, i will stick to Rails.
At 28 March '06 - 08:48 Nathan Logan wrote:
Regarding the comments above on there not being a “best” framework: while that’s probably true, for me, it’s not practical to go learn 8 different frameworks and then use the best one for a particular project. It’s much more practical (and time-effective) for me to make a good decision on a flexible, strong platform to begin with, and then become an expert there. The reason? Efficiency. After all, the point of a framework is to make coding quicker and cleaner.
But I’m certainly not the expert on it – I just started getting used to the framework idea recently. Great site, by the way. I’m excited about the content I’ve seen so far.
At 30 March '06 - 16:21 Megamuch wrote:
All of them miss certain features that imho should be included in the framework. I’m as lazy as hell, and I hate checking for user input. So that’s one thing that should be handled easily and without too much effort.
One other thing I’m missing from most is userroles /authentication/authorization. Almost every website, has some sort of user specific pages. Why have developers design their own – often unsafe – auth methods.
If it’s done right in the framework, developers would save tons of time not worrying about security, but making decent apps.
While the above stated functionaly would certain switch is from a development framework to an application framework, it is imho something that is missed by all php frameworks out there. Cake has an ACL controller, but it’s under heavy redesign and therefor not useable at the moment of writing.
Qcodo look interesting, but leaves a lot of the work still to the developer.
Symfony also looks very promising, but puts its focus on ‘enterprise’ instead of common sense :P
Zend alpha has one unique feature, which is a 100% port of the lucene search engine. If zend progresses into a full featured application/ developer framework, I guess there is a defenate winner there.
my 2 cents.
At 20 June '06 - 18:22 Alex wrote:
At 16 September '06 - 00:54 luegner wrote:
<?php
//OOP
class helloWorld {
function myPrint() {
print “Hello, world.”;
}
}
$myHelloWorld = new helloWorld();
$myHelloWorld->myPrint();
?>
<?php
//Procedural
print “Hello, world.”;
?>
WTF??
At 16 September '06 - 16:25 Marco wrote:
This comment made my day
At 17 September '06 - 03:42 jessieE wrote:
At 17 September '06 - 04:29 Alex wrote:
At 31 December '06 - 07:53 Harro! wrote:
The question that bugs me about frameworks is how much overhead is being introduced?
And how will performance be affected?
At 24 January '07 - 17:07 Donna S wrote:
Interesting read.
At 22 February '07 - 20:44 Paul wrote:
I have been learning PHP and am definitely not an expert. Being new to it, it definitely seems very powerful. But, if it’s to keep going for the lead, frameworks are required. Frameworks that are robust and bullet proof.
This is no different that the old days of C. I remember taking my first course in C. All the code just to do a something with a UI. Then came C and the MFC. This was a huge evolution and took a lot of the dirty work out. One can still get down and dirty with it, but they don’t have to. That’s what makes C and the MFC such a powerful environment. All the way to Visual Basic… many laugh at it, but there are some killer apps out there written in VB.
PHP has the potential in that you can get down and dirty with it. But, some of us don’t want to. We want a framework that allows us to drag and drop controls and components, set their properties through code and focus on providing the the value to our customers quickly. There needs to be and IDE to allow for quick development. I know, I know, the purists don’t like this ideal…. we have to know what’s going on underneath. I saw a video clip of some of something called xblog I think. This was a PHP development environment that allowed one to develop just like you would in Visual Studio. The nice thing is that it generates all PHP code and it’s there for you to see. This was vaporware, and just a demo, but the concept very powerful. You give this to the PHP world and I think it will grow exponentially.
Personally, I see this like the battle between Linux and Windows. I converted to Linux on my servers a couple of years ago. Even though I have a pretty good technical background, I was totally new to it. The installation scripts and the GNOME or KDE UI made me fall in love with linux. I only converted because the Linux world made it easy for us lay people. This got me going on it… over the past 2 years, I have become very knowledgeable with it’s inner workings. My point is.. make it attractive and easy to do most of the common stuff, but leave the power there if one chooses to use it…they will learn it.
I think I’m starting to babble…. my last point is we need those frameworks and IDE’s. Ruby on Rails is a great example of how, if you make it easy and clean, it will take the world by storm.
Regards,
Paul
At 26 February '07 - 23:31 Tee wrote:
I am very disappointed when CakePHP claims they support both php4 and 5.
At 21 March '07 - 22:16 Icandothat wrote:
At 24 June '07 - 23:27 php framework wrote:
At 05 July '07 - 15:59 Michal Slaby wrote:
Learn more at http://tigermouse.epsi.pl
At 17 July '07 - 08:59 pael wrote:
At 22 November '07 - 07:47 php-newbie wrote:
At 28 November '07 - 23:11 Arstan wrote:
At 10 January '08 - 23:11 Ajax Ninja wrote:
I’m trying to find a framework that integrate with ajax widget. Till this time, i use codeigniter rapyd(another small pluggin for CI) and create manual coding javascript framework like jQuery and prototype.
Does anyone know what is php framework with good documentation and ajax gui system integrated?
thank’s
At 04 February '08 - 07:55 lamib wrote:
At 24 February '08 - 21:11 eenx wrote:
At 25 February '08 - 10:24 lamib wrote:
At 30 March '08 - 10:54 stoefln wrote:
Although i miss some important features, i think TYPO3 is a great framework, and i’m very curious bout FLOW3. will give it a try when its finished…
At 04 July '08 - 03:10 Prajith wrote:
At 11 August '08 - 03:10 Procedural Php Framework wrote:
And I also prefer “Agile” development cycle like ROR over the traditional one. Whenever someone talk about ridiculous DataFlowDiagram and and the likes, I know that they are not Agile-based.
This makes my quest hit a brickwall. I end up creating my own framework. It is really a pain in the back! Nonetheless, after 10 years, I think I starting to see a silver lining.
You should also start writing your own framework too. Dont afraid to start late. Remember that Steve Jobs did just that, and end up with great products!
At 11 August '08 - 15:30 stoefln wrote:
wheres the benefit of a procedural framework? (e.g. codeigniter is OOP based but still allows you to create methods and has a lot of predefined methods too)
At 28 December '08 - 14:35 Sebastian Bratu wrote:
I do believe CI is one of the best ( but of course there are others )
It really depends on your style as a programmer.
At 10 December '09 - 07:34 Walter wrote:
I started PHP before it had OO. When OO PHP came along, I tried it but didn’t see the point. Sure, code can look pretty, but why write all that extra? Since then I have managed large and complex multi-developer projects and I gave compelte freedom to coders of specific subsystems to implement using their preferred paradigm. Some used OO. The code they produced proved much more difficult to align with changing project requirements and ultimately everyone wanted to rewrite it. That was one experience. Lately, I’ve been reading up on software design theory (books like ‘Coders at Work’, which interview experienced developers from all languages in an informal fashion) and have found they have had similar experiences. I’m not wholly against OO, I just don’t think it’s necessary for most web applications, and it can often hinder rather than help re-usability by making it easy to assume too much about its environment (ie: class/object-system). I’m not saying all OO PHP code is bad, just that a lot of it is harder to repurpose than simple functions with well-defined inputs and outputs.
Next, I am heavily weighted against code generation and cut and paste approaches. It’s true that if you are coming from a build/deploy/forget model and have been writing the ‘plumbing’ code yourself then code generation saves time, but it doesn’t make it the best approach. To illustrate, let me say that the only projects I take tend to be relatively complex or require long term maintenance rather than the ‘build/deploy/forget’ model that many simpler websites use (and many less experienced PHP programmers produce in great volume). Because of the nature of these projects, I have learned (the hard way) that it is more time efficient in the long term to write properly segmented, documented, re-usable modules instead of hacking out 100 slightly different unstructure codebases. Code generation has its purposes, but most of the time if you can code-generate, why not just write smarter code?
Finally, to achieve the modularity I need for maintainability, I use a simple but powerful modules system of my own design that is built in to my framework rather than PEAR. Why? A few reasons: I don’t use OO (most PEAR modules are OO-based), I don’t want the overhead of a heavy-weight documentation system, and I don’t want the complexity of PEAR integration on every deployment platform. My framework’s modules system integrates with my OS package manager, so I can easily include system-level package dependencies or PHP feature dependencies with my modules (ie: “PHP must be (re)compiled with ‘ctype’, ‘json’, etc. for this module to work”). The modules system also includes standardised hooks functionality, self-test functionality, structured settings export, internationalisation, interdependency resolution, custom install scripts (including automatic database extension), etc. It’s at the point where I can just install a website and the system takes care of all dependencies, building up a database exactly as complex as required by the modules in question in an iterative fashion. This has been a real time saver.
When I do take the time to review them now and then, I tend to find that most PHP frameworks fall down in areas such as: non-interactive (automated) deployment, system-level package dependency resolution, internationalisation, and support for alternate execution models (batch executed scripts, related sites on the same filesystem, mature hooks interface to facilitate software extensibility, etc.).
That’s my 2c.