>>> roy woods <[EMAIL PROTECTED]> 19-Apr-01 10:21:31 AM >>>

>So from what you are saying the two of them (JSP and servlets)
>complement each other rather than compete. As you probably
>have guessed, I am new into Servlets and I asked the question
>to see the bigger picture.

They do complement each other, yes.


>I never heard of MVC. How does it fit into all these?
>I guess I need to investigate this.

MVC stands for:

  Model View Control

It's a program design idea. You split the functionality into 3
differents parts:

  Model - represents the data, ie: a set of objects representing your
data
  View - displays the model to the user, eg: a JSP page
  Control - handle operations on the model, eg: a servlet

The traditional way to implement this is to have a set of beans
stored on the session as your model and JSP pages that reasd off the
beans and display data in the beans inside HTML tags. The JSP page
actions (eg: form submits) point to a servlet which does all the work
analyzing the request and modifying the model beans. Once it's
finished the servlet forwards the request to another JSP page for
display.

This works quite well but I find it a pain to implement, you have to
have one servlet for every JSP page or very messy servlets.


Lots of people have been working hard the past couple of years to
come up with new and easy ways to separate view and control. The
XML/XSLT paradigm is another way of doing this and is a bit cleaner
and more logical than JSP... but it's generally harder to fit into
your development model because it can't really be reto-fitted into
some HTML.


Nic

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to