Ruby on Rails has become a popular framework for developing database-based web applications using the Model-View-Controller (MVC) pattern. Before Ruby on Rails, though, PHP was hogging the web-development limelight. Problem was, there was no Model-View-Controller (MVC) framework for PHP. With Ruby on Rails, though, PHP …
Other options - CakePHP, Zend, Symfony and CodeIgniter
Having spent a good deal of time checking the PHP framework options, I'd say if you want a quick, simple and fun framework go with CakePHP, but if you care about simplicity and performance then CodeIgniter is your answer. It's great to have so many choices, but it's a shame there isn't a dominant PHP framework to receive the attention and improvement of a large dev community. Check out http://www.google.com/trends?q=codeigniter%2C+cakephp to see popularity graphs.
Off the trax
I prefer the CodeIgniter framework, http://codeigniter.com
It does MVC, but is minimalistic and not as intrusive as some of the other php frameworks.
Works a treat.
for the vast majority of crappy small-medium php sites this MVC stuff is total and complete overkill.
that pattern where you expose a table via objects, insulating people from SQL lets people produce crappy database code on the wrong layer.
when i was working on php sites i had my own little helper stuff for doing this, a few decent global functions (I am not writing loads of spanner->fishcake() commands i want to finish some things before i die)
all this cruft - look if you want to write in a proper language sod off and use java or asp. don't bring the amount of pain and grief to a simple language that doesn't need or want it. most web code is utterly boring and doesn't need a whole bunch of classes in the way.
now the most annoying part of all this crap. running command line apps.
you know what. its a web app. can i have an interface please? oh but that would require a decent login/authentication/roles/forgot password/system. like 95% of most sodding sites. build it in.
this is why i left coding. too much emphasis on the bloody mundane, pointless, buzzword friendly cruft whilst the big stuff goes unsolved.
Ruby On Rails - famous for nothing except taking longer to deliver a page to a user than it took the developer to write the app! Here's a great idea- let's all lumber PHP with the same shite.
Come on, chin up! I don't think MVC is overkill for any site. It really improves development speed and allows you to re-use code *much* more easily. I have to look after a lot of old-style sites, and it is *painful*.
In fact, if anything, there's *less* cruft with them. No need for the old `($conn = mysql_connect()) OR die();` rubbish.
Personally, I use Kohana. It's based on CodeIgniter, but requires PHP5 and is generally tidier.
Symphony all the way!
I just love it... I got sold on it after wasting tim... ehrrr "researching" on RoR.
I really like the idea of a framework: makes me focus on the business side of the application and not on the backend. Plus I managed to configure Symphony to be really fast in delivering pages and results.
@annoying - if you'd used MVC you may have stayed coding
What we're finding is that using Zend framework and Smarty based MVC means that the code is kind of folding in on itself and getting easier and easier.
Say we are producing a bespoke solution. I.e. there is no existing web app like SQL-Ledger, RT, Twiki, Moodle etc etc etc which fulfils the requirements.
OK - So we're going to build a web based application - after all - coders have changed from 4GL, VB, Delphi, to web based like a herd of wildebeest thundering over the plain.
Let's get the framework in place - by which I mean the DEV/TEST/LIVE LAMP servers, backups logins for developers, Twiki page etc, etc.
Now we put in place a basic MVC based app.
Once we are up and running the development gets easier and easier - we just concetrate on getting the clients specs correct - and building a DB structure which will be able to hold the data.
Actually implementing the interface (using Smarty) becomes very easy.
It's difficult to fully explain - but it feels as if after all the different ways of implementing PHP based applications and everybody re-inventing the wheels we are finally closing in on a standard.
I also like Code Igniter.
I'd rather have these examples on a UNIX platform though: there's something so retarded about c:\php as an installation directory.
Wheres the 3rd generation rails?
My problem with these CRUDy things is they are all so naive. After years of writing DB's I practically never access it unless thru procedures that almost never access one table alone.
All you need is a few clever naming trix and a matching form handling library and you can knock a front end up via the DB itself - and move the DB to any provider changing a connection string.
- Comment Renewable energy 'simply WON'T WORK': Top Google engineers
- Useless 'computer engineer' Barbie FIRED in three-way fsck row
- Game Theory Dragon Age Inquisition: Our chief weapons are...
- 'How a censorious and moralistic blogger ruined my evening'
- Leaked screenshots show next Windows kernel to be a perfect 10