59 Comments
- stubby, on 10/12/2007, -0/+28Frameworks exist to increase productivity and reduce errors. It does a lot of common (or not so common) tasks and helps to standardize the way an organization or project is done. It can benefit your productivity, security(assuming the framework is secure), and clean up your code a lot.
But yes, you can just program in php with or without frameworks. - joshpape, on 10/12/2007, -2/+20Excuse my ignorance but can someone explain what a framework is? Can't you just program in php? Thank you:)
- kyriakos, on 10/12/2007, -0/+17its easy to write a small script.. but once u get into bigger and more complicated sites u have to follow some kind of structure.. a framework gives u just that plus a number of tools to speed up the development of such sites
- inactive, on 10/12/2007, -0/+9When I read "what is framework?" from joshpape, I expected their to be massive flames directed at him "for being a n00b" and "why are you on digg?" and the like. Instead, I read posts that were constructive and informative.
Well done, digg! My faith in you has returned!
digg - rcook, on 10/12/2007, -0/+8I've never quite understood the need for using a templating language (Smarty) within another templating language (PHP). Just don't put your logic code in your template PHP files. You don't need two different languages to do MVC with PHP.
- andywaite, on 10/12/2007, -1/+7Drupal and Mambo are not frameworks - they are Content Management Systems (CMS). A framework can be used to build applications which have a wider use.
- joshpape, on 10/12/2007, -2/+7thank you very much kyriakos and stubby
- psylence, on 10/12/2007, -0/+4Cake is nice, but I'd give Symfony a shot first. Last I used Cake, they were trying to shoehorn Ruby on Rails into PHP to the point of madness.
Symfony takes a different outlook, trying to get the _productivity_ of RoR while using the things PHP is good at. - jarod42, on 10/12/2007, -0/+4"Each framework offers different functionality, and there is no clear winner. Just like most things, it comes down to preference and personal choice. I highly suggest you look through the documentation of each framework above, and decide yourself which framework you like best."
If only more people would turn around to this point of view - I think it's getting there, but there's still a lot of the "my framework is better than your framework" rumbling going on out there. Sure, there are some that are more well-suited to more tasks out there, but on the whole - go with what works for you. - ripter, on 10/12/2007, -0/+4I agree with rcook
I've used Smarty for projects but didn't see the real need (or point) All smarty really forces you to do is keep your logic in a different file from your display. Why do i need the middle man, I can do that on my own. - smokebomb, on 10/12/2007, -0/+4This review is crap. Its pretty clear this guy hasn't really tested any of these frameworks in a real world setting. His review of Cake and Symfony are especially misleading. He leaves out several features of both and writes off Symfony as "too complicated" without justifying it.
- pbjorge12, on 10/12/2007, -0/+4I can think of a reason...Server support...
How many servers support Ruby? - alucinor, on 10/12/2007, -0/+3Ruby is ahead of PHP in terms of syntactical clarity, and benefits from having a dominant web framework (rails).
But PHP is way ahead of Ruby in terms of libraries, and its ecosystem of applications. Most sites and web apps can be built using Drupal, which is the most flexible and robust CMS I have ever encountered (though the flexibility comes at the price of a steeper learning curve than say, Joomla or a Nuke).
My point is ... why care so much about syntax and frameworks, etc.? PHP has a very mature stack already -- shouldn't people be more excited to build on top of the stack instead of trying to reinvent lower layers in the stack? Take a lesson from x86 processors -- probably one of the crappiest processor architectures ever, yet it has become dominant because of the rich application stack built on top of x86.
Similar to x86, PHP is entrenched. I see Ruby as a great tool for small to medium sites, or webapps that are so original no existing CMS can facilitate them. But if you want something powerful and quick that you can innovate on top of in short order, you'll probably want to go with PHP, because its ecosystem of libraries, tools, and support is already huge. - kyriakos, on 10/12/2007, -1/+4unfortunately for me symphony is php5-only.. the servers I own are still on php4 and since many client sites are hosted there running happily on php4 I have to live with it for the time being.
- jschrab, on 10/12/2007, -0/+3I looked into CakePHP some months ago. There were some very positive things happening there but I had to go with Symfony in the end because there was just so much more documentation. I recommend giving Symfony a look - the recently improved administration application "scaffold" generation gives you a lot to start with.
- smokebomb, on 10/12/2007, -0/+2Symfony also lets you use Smarty instead of its built-in templating system.
- zetsurin, on 10/12/2007, -0/+2Interesting to see that Smarty template framework has been omitted. It's an excellent system for separating GUI from code and has allowed myself to extend my product into markets I wouldn't have been able to venture into due to the fact that my UI can be rebranded and modified for use on different mobile device etc. Worth checking Smarty out.
- beachbum, on 10/12/2007, -0/+2Try the Code Igniter framework - http://www.codeigniter.com . It's new, so features are still being added, but the code is rock solid, and the documentation is nice. It's an MVC framework (not all those listed in the chart were), and it has a significant amount of tools (although there are some missing, like AJAX, that would be nice to have eventually). I started using it recently and was impressed by how easy it was to use.
- Xopl, on 10/12/2007, -0/+2The objecty nature of Ruby is cool. The syntax is ***** crazy. There's a reason why PHP succeeded over Perl for market share in the web app market, and I have to believe crazy Perl syntax had something to do with it. If in PHP 6 they can nail the object stuff like Ruby does, and facilitate the "DRY" frameworking, while keeping a sane syntax -- now that is something I'd like to see. (I realise my comments are subjective.)
- jabowery, on 10/12/2007, -1/+3Django and Rails, both DRY (Don't Repeat Yourself) frameworks, were both written by PHP programmers who decided they needed something better. They needed to escape to a language (Python and Ruby respectively) that supported adequate object semantics natively. I don't see how doing another kludge for PHP, the way Java programmers tried to pull off with Struts (and now other attempted DRY frameworks for Java) is going to help. The Java guys are losing ground and to hardcore DRY systems and the PHP guys seem destined for the same fate.
- vh1`, on 10/12/2007, -1/+3"syntax is ***** crazy"?!
I know this is a rails snippit, but it shows how readable ruby is
redirect_to :back unless user.nil? - JoyrexJ9, on 10/12/2007, -0/+2The Java guys won't lose out to stuff like RoR in the long term, the reason being Struts is pretty much part of J2EE and that's what the big boys are using. I can imagine any real companies building enterprise apps with RoR or in fact ever going near it. Fact is Java is around to stay (and I'm not a Java fanboy)
- prazgod, on 10/12/2007, -0/+2@johnny
You are missing one of these commercial plugins for joomla - mosLock or MamboCharge - both allow you to charge for access to a Joomla Site.
@davidv
Mambo is NOT all corporate now, its just being run by a buch of tossers which the real brains and skills all moved to Joomla. Peter/Miro is to blame for it all. - andywaite, on 10/12/2007, -0/+1Smarty isn't a framework in itself, but Zoop is built using Smarty.
- Leech, on 10/12/2007, -2/+3I also like Symfony, but it only runs on php5 and my own servers have php4, and lots of clients using php4.
Time to buy a new server I think.. - dink, on 10/12/2007, -2/+3heh this will get marked down ... markdown now there is a text helper :-P
Anyway. Php holds LOTS of promise for mid and small projects,- and larger ones like friendster, if you have the cash.
But really, rails does an arse kicking job. I can't tell you enough how happy I am that I manage to get all the php code
declared legacy and have been able to move to entirely ruby on rails within my company.
Yes it may sound like another rails fanboy post, but I dont have time to wait for php to catch up.
The business has to turn a profit NOW- and the projects have to be eaisly maintable, extendable, and otherwise
do things that php has traditionally been bad at, hence why there is such an effort to copy rails.
Good job and good luck to the different php teams for trying to bring real coherency to php, but in the mean time,
it doesnt hurt to look at what works, today!
@pbjorge12: lots of server support ruby and rails. dreamhost, and even icdhost. yes hosting for as cheap as ~$30 a year support rails and ruby. so thats an obsolete argument. - prazgod, on 10/12/2007, -2/+3Yes they are CMSs - however Joomla.org is a much better CMS - which is also an application framework - I know as I make 100% of my income from developing for Joomla. All of my applications recently have been created in the Joomla Framework and they are very successful (Oh yeah, I was also one of the original MAMBO developers ;-)
Joomla is a great framework that speeds up my development loads - without joomla I would have to write loads more code to acheive results - kyriakos, on 10/12/2007, -1/+2nice. Just looking into CakePHP and seems to be exactly what I was looking for.
- Xopl, on 10/12/2007, -1/+2rcook is right. You can, and I do, have MVC PHP code where my templates use PHP echo statements instead of having to load and render Smarty templates. I'm sure it is measurably faster, and this way you don't have to learn another syntax/language (albiet Smarty is a lot like PHP).
- ripter, on 10/12/2007, -0/+1Server support is the only reason I don't switch to RoR (or php5)
- johnnybravoh, on 10/12/2007, -0/+1I dunno, but I'm probably missing something... Joomla for me was a tremendous pain in the ass to deal with. I didn't have the control that I wanted in terms of layout for articles and categories or the control that I could have was so completely buried that I couldn't find it and excercise it in a reasonable amount of time.
And if I wanted to develop a site that catered to subscription based content I would have to resort to a hack (ala OSCommerce - i.e. open up index.php, locate the line foreach($foo as $bar){... etc..)
In the end, I ditched Joomla and am developing something from the ground up. What am I missing, please tell me??? - CaughtThinking, on 10/12/2007, -0/+1Excellent summary. The Java frameworks need to get a page like this.
One step further would be samples of how you perform each function under each framework. - aoeu, on 10/12/2007, -0/+1Rather humorous indeed.
- tanker, on 10/12/2007, -0/+1Very good article to at least increase the awareness of what is out there.
- Xopl, on 10/12/2007, -0/+1Templation is a cool PHP "CMS" ... more of a website templating system. I use it on 5 sites totalling thousands of pages. Couldn't live without it anymore for sites this big.
http://templation.websaviour.com/ - mohrt, on 10/12/2007, -0/+1Let's try an analogous argument:
"I've never quite understood the need for using a language (PHP) within another language (C). You don't need two different languages to do HTML with C."
That is kind of an absurd comparison, but the point is valid. People use PHP to build webpages because of the utility and easy-of-use, not because it is faster than using C directly. Much the same goes with Smarty... it's not that another abstraction layer is required for the presentation, but the utility of it is enormous (vs. straight PHP code.) - nvidiafx, on 10/12/2007, -0/+1CI is very easy to use. I use it for most of my projects. symfony is cool too, but its quite complicated. ill look at it later.
- silenceHR, on 10/12/2007, -0/+1thnx for this, i needed this. now i have more options.
- hadem, on 10/12/2007, -0/+1There will be more and more that support it as time goes on. I used to love PHP but then I tried RoR, and it is great. Give it a shot instead of just bashing it. If you don't like it, then just go back to PHP but who knows, you might actually like it.
For servers that support it, try:
http://dreamhost.com/
http://site5.com/
http://textdrive.com/hosting
http://wiki.rubyonrails.com/rails/pages/RailsWebHosts (Huge list of hosting options.)
http://rubyonrails.org - JoyrexJ9, on 10/12/2007, -0/+1I tried Cake but didn't like it's templating with still too much code in the template for my liking compared to Rails' very pure approach. PHP on Trax suffers from no docs and no community around it, so I gave up on it. I guess I'll give Symfony a try next! The problem with most of these frameworks (RoR as well) is they all assume you'll want them in the root of your webserver, and it's a pain to start messing about with virtual hosts, aliases etc. when all I want to do is knock up a quick test app on the laptop
- JoyrexJ9, on 10/12/2007, -0/+0Ok tinkered with Symfony last night. I like it a lot, partly because so far it's "just worked" and I haven't touched my httpd.conf or php.ini once (unlike some of the other frameworks) but there seems to be a lot of configuration, and it's clearly not following RoR nice principle of "Convention Over Configuration" which is a shame coz that's what makes RoR so clean and appealing.
- veracon, on 10/12/2007, -1/+1A nice chart. Even though I don't agree with many of the views (and I don't like any of the listed frameworks much), this may indeed be useful to some people.
digg. - bobthecow, on 10/12/2007, -0/+0a great overview. i've been using the ZooP framework since the 0.9 pre-release, and couldn't be happier with it. it uses smarty templating, which is great. ZooP also does AJAX, a php version of webControls, and as of 1.2 it looks like the framework will include cache support as well.
- inactive, on 10/12/2007, -1/+1Man, I've been waiting for ages for an article like this. Trying out each of these is usually not worth it. Either under-documented or too much of a learning curve just to get a taste. I'd digg it ten times if I could. *smile*
- PrisonerOfPain, on 10/12/2007, -0/+0To rcook, lets say you let the users of your website build there own custom templates. In that case, you surely don't want them to be able to execute PHP code directly, instead, you'll use a template engine.
Oh, and it might help you to force you to use an MVC architecture, but that wouldn't be the case with Smarty as it doesn't let you use MVC properly in the first place. And a template engine is there to actually reduce the amount of code you have to write. - pbjorge12, on 10/12/2007, -1/+1Code Igniter seems very good...It doesn't even require PEAR or the command line...
I will definitely give this a shot! - Beanlover, on 10/12/2007, -1/+1CodeIgniter ftw!
I recently started using it and, once you get past the (small) learning curve it seems to work really nice. I've yet to put anything "heavy" on top of it but for light work it's great.
You don't have to use templates but you can...even smarty. And you can probably use something like xajax inside it as well (although I haven't tried it yet).
It lives up to its goal of being lightweight and easy to use. Code is VERY well commented and it comes with complete documentation of all it's functionality.
Worth a look. - snide, on 10/12/2007, -0/+0Smarty is awesome for large dev teams that split their production (css/html) staff from their engineering staff. It makes the code editable and accessible by just about anyone and gives noobie production hires the chance to work on a complex site without really having the ability to ***** anything up.
- inactive, on 10/12/2007, -1/+1"PHP frameworks are the latest hot topic in the PHP community, and new frameworks are being released daily. With over 40 frameworks available it's difficult to decide which framework works best for you, especially as each framework offers different functionality."
Has this person ever heard of a pronoun? He uses the word "framework" 5 times in two sentences. - silenceHR, on 10/12/2007, -0/+0@ subsec.... just for being grammar nazi (kidding) - this comes from non-english native.
if it's comfusinf for you, imagine how it is for us who do not speak english as first language.
do not get me wrong, but sometimes i get the feeling that people speak better english in some countries that you would never think about or even know about. -
Show 51 - 59 of 59 discussions



What is Digg?
Digg is coming to a city (and computer) near you! Check out all the details on our