MVC is dead (really)

by Jeff Haynie on November 7, 2007 · Comments

Nolan just posted a well written piece on why he thinks model-view-controller (MVC) based designs for web applications are dead – and I agree. Also, Chris Haddad posted “MVC Matrix and the Red Pill

As architects of the web, it’s easy to continue to evolve things as they’ve always been without making much adjustment to the fundamentals of the design. Refactoring allows us to continue tweaking something to make it better – and often you get incrementally better improvements. But, sometimes, when you take a step back, you’re looking at a big hairball of a design. That’s where we are with web architecture these days – and why I believe lighter-weight frameworks like Ruby on Rails have been wildly successful. But RoR only solves part of the problem, but not the fundamental problem of how apps are built and how services are accessed.

Try to do a simple web app in Java these days – name your framework? Arghhh. Puck. XML config files, web flows, JSPs, controllers, models and DAOs, WAR files, JARs, blah blah blah. And want to refactor your layout? Forget about it. Cut up the HTML again into pseudo-HTML via tag libraries, inline code and templates – and let’s try it again. Look okay? Ok, let’s do that again and again. Well, you won’t because it’s too painful and you’re app suffers. You compromise because the process isn’t broken as much as your architecture.

Enough is enough. We need to really rethink MVC on the server side as a way of building Rich Internet Applications. Let’s take the opportunity to actually do service-oriented architecture (SOA). SOA shouldn’t just be a webservices bolt-on. It’s not an afterthought – or yet another set of crap in the middleware stack. No, it’s central to the design - it’s the main act.

SOA based applications, what Nolan calls SOUIs (Service Oriented UIs) are really already becoming popular in the commercial and social web space with mashups and the popularity of REST. It really looks a lot like the older days of desktop applications – something we used to call “Client-Server” Programming. I’d suggest it’s really now “Client-Service programming”. Where the “Client” can be a variety of application types: RIAs, offline web apps, machine-to-machine apps (via service-to-service integration or “mashups”), Desktop Apps, etc. And “service” isn’t some set of capabilities bolted-on to the side of an MVC framework with AJAX, REST or SOAP bypasses.

The original Web Architecture model by Tim Berners-Lee is still very appropriate and I think is really the simplest form of the Client-Service architecture. Let’s get back to simple. Let’s get back to what really matters – creating applications. Enough of the complicated server architecture. Enough of the layering of the stacks on top of each other. Can’t we just all get back to a sane process for quickly building applications?

We’ve come a long way over the past 10-15 years. A lot has evolved. We need to take a step back and think about how we can build apps for the next 10 years and learn from what we’ve accomplished. MVC is dead. It’s not yet in the grave with all the millions of programmers and thousands of frameworks. But, we need to start preparing for that day. MVC is old and sick and feeble. We need to start thinking about the funeral.

Tech Tags:

Popularity: 24% [?]

If you enjoyed this post, make sure you subscribe to my RSS feed!

  • Steve Conover
    MVC will be around as long as there are user interfaces and data (I just finished a project that had at its core MVC separation in JS on the client - we loved it). It's a nice organizing principle that often makes your life simpler, and yields powerful reuse possibilities when done skillfully.

    Popular frameworks bloat. MVC/ORM/doesn't matter what it's based on - but it doesn't mean the underlying ideas are bad. Another way of saying that is, the bloat is parasitic on the simple ideas that attract everyone in the first place.

    The important thing is to take the *ideas* away that you like, and go find a nice stripped-down environment that expresses what you care about in as near a poetic way as you can get.

    A few things to check out:

    OOJS foundations: Mootools, Prototype
    JS testing: JsUnit
    Interesting ruby mini-frameworks: Sinatra, Merb, Camping, Datamapper, Sequel
  • Mike
    Recently Microsoft announced a new ASP.NET MVC framework and there has been a lot of interest in it, so it's not really dead in the minds of programmers.
    In fact, I believe that even in SOUI (as I understand it) you'd still need routing and controllers. Granted, views are not needed if you have a single page AJAX/DHTML interface, but you still need to call to an endpoint that maps to a controller.
blog comments powered by Disqus

Previous post: Introducing Appcelerator

Next post: Startup Weekend Atlanta