After experimenting with CakePHP, Zend, Ruby on Rails, Django, Turbogears, Pylons and DotNetNuke I have given up on lumbering MVC frameworks. The kind of work I do is either too small or too specialised and using a MVC framework is either massive overkill or I have to spend days trying to hack the code to join a database table in just the way I want it or connect to a webservice.
This kind of sweeping statement is not going to earn me a lot of friends. The people who are into these frameworks are devout to say the least.
Probably my biggest gripe is that the whole idea of a MVC framework is to have separation of Model, View and Controller but if you ever build a site using one of these frameworks and attempt to uncouple these components you’ll quickly see that the touted separation is not all it’s cracked up to be.
The idea of having a templating language is inspiring but the fact that there is no defined standard for templating means that Smarty only works with PHP, Kid only works with Python and so on. I take it back; XSLT is a standard but it’s got to be the ugliest, most convoluted language out there.
Defining your model is exciting when you’re starting a Hello World project from scratch but can be pretty tiring when you’ve had to make it fit an existing database that doesn’t conform to the pluralised, *_id-ised requirements of your particular framework. And on top of that you have to relearn your particular framework’s substitutions for the SQL you’ve already had to learn. “DRY” anyone?
Don’t get me wrong, the MVC way of working makes a lot of sense. I use mod_rewrite call a Controller file which in turn feeds data from my Model class to my View class. But I don’t make my Model speak anything other than SQL if I’m accessing a MySQL database and I use <?php ?> blocks in my templates if I’ve chosen PHP as my language du jour. Why learn two additional, less powerful languages?
I agree that there are many situations where you would be better off developing a large website using a traditional MVC framework but I would be under any illusion that it’ll be any more flexible a year down the track.
For me, redemption would come in the form of a standardised templating language and a standardised set of classes for models that easily integrate into existing databases as well as being able to generate new ones.
If you’re creating a small or a fiddly website then I would advise you separate your data from your logic from your presentation but steer clear of the lumbering behemoths that occupy the MVC space at the moment.