File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes MVC architecture Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "MVC architecture" Watch "MVC architecture" New topic

MVC architecture

Hardy Cao

Joined: Aug 25, 2002
Posts: 1
if i get the MVC architecture correctly:
would it be correct if i say that:
let's say there could be some jsp pages with only 1 servlet controller and a
couple of beans in a module. let's put it that my application consists of
modules. that means i have at least 1 servlet controller for each of my
William Brogden
Author and all-around good cowpoke

Joined: Mar 22, 2000
Posts: 13036
While it is usually pretty clear that Beans take care of the Model end, and JSP typically present a View, the Controller tasks can be spread out so I would not get dogmatic about it.
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 17410

"True" MVC was designed for an environment where the components are much more tightly connected than HTTP allows. Among other things, HTTP doesn't permit the controller to modify the view after it was sent nor for a view to talk back to the controller without being completely replaced (I'm talking web pages, not HTTP tunneling here, BTW).
Some quite usable paradigms have been made after the fashion of MVC that DO work in the HTTP world, such as Model 2. And this points out the value of using Patterns as guides vs. ironclad Rules. If you avoid dogmatism, you can adapt a pattern to make you more productive, thence creating a new pattern. If you look at Patterns as immutable Law, you'll end up choking on your own narrow orthodoxy.

An IDE is no substitute for an Intelligent Developer.
I agree. Here's the link:
subject: MVC architecture
It's not a secret anymore!