MVC (Model-View-Controller) Frameworks Versus HTML

Model-View-Controller (MVC) is a software approachserious, otherwise insoluble problem will motivate
to website building and display that separates what issomeone like Kuwamoto to get "into MVC [for]
called the "application logic" from the actualdesktop GUI programming." For many programmers,
presentation. What this means in practice is that itseparation between Views and Models was important,
permits web pages to contain just small amounts ofwhereas separating out Controllers was in the "more
"scripting," or PHP commands for automated actions,trouble than it’s worth" category.
since the presentation portion of the page is separateAbout MVC making sense "for the HTML-based
and distinct from that PHP scripting.world," the explanation goes like this: There is physical
A few quick definitions are in order. The "Model"separation between the View, which resides on the
means the actual data structures, the various functionsclient computer, and the Model that is on the server.
that empower your pages to fetch, incorporate andThe logic for responding to user events is typically
even update the information in the database you arehandled on the server, so does it even (or ever) make
using. The "View" comprises all the informationsense for Models to manage these events? The
presented to a website visitor, normally a web pageanswer is a definite "no way," so you separate the
but possibly a page "fragment" such as a header orController logic from the Model logic. HTML and MVC
footer, an RSS (Real Simple Syndication) page orcapabilities can support one another, as they should,
some other "page" type. Finally, the "Controller" is therather than be looked at as an "either/or" situation.
intermediary among the Model, the View and anyDownsides updated, too
other necessary resources, all of which work inThere are some unpalatable things about a hybrid
concert to reply to an HTTP "request" and generateapproach, of course. There are architectures where a
web pages.single Controller handles every one of the "actions" for
Programmers compete, you winthe whole application. A few programmers may see
There are already various "coding companies" bringingthis as a "good thing," while plenty of others would
the MVC workflow and structure to the applicationconsider it a necessary evil, at best. Isn’t the "World
shelf. Some have a somewhat "loose" approachof the Giant Switch Statement" one of the very things
where Models are not absolutely required. If you canevery engineer in this niche wanted to avoid by
live (that is, if your pages can "answer the call") withoutadopting object-oriented programming?
the additional separation, or if designing and maintainingWith applications like Adobe Flex and others, you have
the Models is more complex than you like, you canthese powerful, adaptable engines on the client side
simply build your site with just the Views andthat can manage the complex logic-and access web
Controllers. Since you can usually incorporate yourservices directly. The various forces that propelled the
existing scripts, and develop custom core libraries, youMVC model to the forefront should be reexamined in
get to work the way you want.light of the goals of each individual. It is a powerful,
The notion that MVC is competing with HTML iseven necessary, development, but certainly does not
incorrect, although some coders and site builders makepresage the "end of HTML."
a deal out of "MVC vs. HTML." Regarding RIAs (RichFor some applications it makes very good sense to
Internet Applications, full-featured software packagesseparate out Controllers, and for particular components
that run in a browser), a leading software geek-Shoit makes sense to leverage the MVC method. For the
Kuwamoto, former Macromedia/Adobemajority of applications, however, separating Views
engineer-opines that "MVC is probably not needed forfrom Models is the biggest winner in the workflow.
most RIAs [and] is probably overkill for the vastSince, in the majority of cases, the Model part of the
majority of [Adobe] Flex apps." However, he alsoapplication comprises services that reside on an
realizes that "MVC actually makes sense for theentirely different machine, the separation is something
HTML-based world."that you really have no choice about, anyway. Getting
Peacemakers, not code warriorseverything to work together to the greater good-the
This is hardly the type of "us versus them" talk someuser experience-is the bottom-line goal for the
are using, and is much more sensible. Another sensiblescientists and the artists that join forces to push the
observation concerns the general tendencies exhibitedInternet forward, often an inch or so at a time. Stay
by programmers and engineering managers, a leadingtuned to MVC, and HTML 5, or you will definitely miss
one of which is laziness. This means "laziness" in asomething-and it could be soon, too!
comparative way, in the expectation that only a truly