MVC: Wrong for Web Apps?

By Deane Barker on December 24, 2005

MVC and web apps: oil and water: Harry Fuecks does the unthinkable over at SitePoint: he calls MVC (model-view-controller) architecture into question for Web development.

[…] let’s face it: MVC sounds impressive (and intimidating) to people no in the know. What do we do when we see a term we haven’t come across before — search and find many other people saying “Yes MVC.”

So have we asked enough questions or have we just jumped on a collective bandwagon?

It’s an interesting article, and the comments are good too. There’s a lot of frustration out there, it seems, with the drive to make MVC work as well on Web apps as it does on desktop apps.

But a lot of it comes down to semantics, I think. I look at an app in three levels.

  1. Data
  2. Logic
  3. Presentation

Separate those three layers, and you’re in much better shape than most of the Web apps in the word. Make sure your data layer is independent from your logic and your presentation layer can be swapped out, and things get a lot easier (gosh, isn’t there a CMS that does this too…).

Interestingly, Fuecks also points out the name I’ve been missing for “standard” Web development: it’s called “Model 1.” From Wikipedia:

The Model 1 architecture is very simple. A request is made to a JSP or servlet and then that JSP or servlet handles all responsibilities for the request, including processing the request, validating data, handling the business logic, and generating a response.

I struggled with this missing name in my post on Camaros and PHP. If this is all you’ve ever programmed, remember on your next resume to say that you’re “experienced with Model 1-architected Web application development” — that’ll sound impressive.

There’s a Model 2 as well, apparently, and it’s…MVC.

What This Links To