"Craig R. McClanahan" wrote:
>
> "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).
>

if one agrees with and understands the mvc boundaries within
a specific problem domain, an initial approach to address
"which technology do i use where" could, imho and ymmv, be:

        model - beans and enterprise java beans
        view - jsp, html and ui only javaScript
                (eg graphic rotations on mouse over)
        control - servlet

this is just a rough guideline and some amount of overlap
may occur for very valid reason but i believe this is a
good starting point and one which should be revisited as
a project progresses. it takes dilegence to walk the line
and make the right changes.

this, in a nut shell, is why i'm *extremely* amped about
j2ee and it's usage of jsp/servlet/ejb and xml.

- james

___________________________________________________________________________
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