JSP doesn't architecturally enforce the model/view/controller paradigm. They
have documentation explaining how to do it, but it's not fundamentally
part of the design.

Using a template engine such as WebMacro is in my (very clearly biased)
opinion a much better solution, since the model/view/controller design
is actually architecturally enforced.

Trying to do m/v/c with JSP is dangerous, because late some tired night
someone will slip some logic into a template, making the applicaiton
inflexible and hard to understand.

I'm biased because I created one of the alternatives, a template system
called WebMacro, which is free and available here:

    http://webmacro.org

Justin


Quoting Craig R. McClanahan ([EMAIL PROTECTED]):
> "Zhou, Bin, BGM" wrote:
>
> > I can not agree more and I think the JSP might do better in this sense.
>
> Of course, JSP tempts you to make the same "mistake" (IMHO) in reverse, by
> embedded functional Java logic in your JSP page full of HTML code.
>
> I have found that the best practice for my apps is to use pure servlets to
> manage the business logic (acting as the "C" in MVC), storing the results in
> beans, and forwarding control to an appropriate JSP page to display the
> results.  The only Java logic I use within JSP pages is solely related to
> formatting (such as a "for" statement to iterate through an array while
> generating table rows).
>
> In the JSP 0.92 spec, this was called the "Model 2" application design
> approach.  JSP 1.0 calls it the "Redirecting Requests" model instead (Section
> 1.6.5 in JSP 1.0).  This approach is well worth your time to study and apply.
>
>
> >
> > :-) Bin
> > Bin Zhou
> > *732-957-7692
> > *[EMAIL PROTECTED]
> >
>
> Craig McClanahan
>
> ___________________________________________________________________________
> 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

___________________________________________________________________________
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