From: Shashank Phadke <[EMAIL PROTECTED]> wrote:
>>Let's pretend that for some reason, there is a requirement for some >users
>>to access your system via a native MS Windows application. If >your
>>business layer sends out HTML and expects HTML form input, it >would be
>>very hard. However, if your business layer sends out >business objects and
>>expects the same in return, then your new app >can get those objects and
>>display them as it sees fit.
>I believe servlets just act as a glue connecting your business logic with
>the presentation. The actual HTML *generation* classes should be clearly
>de-coupled from the servlet logic. HTML generators can talk back to the
>business objects, get data and generate to any presentation FE which
>requires it - either browser / MS application as you said.
Let's say this native Windows application wasn't displaying any HTML; it's
just a normal Windows app with 4,000 toolbar buttons and a bunch of complex
UI components that for whatever reason have to be written in Windows (no
Java, no HTML). It wouldn't make any sense to have HTML generators in the
business layer sending HTML to my non-HTML Windows app.
The purpose of a servlet is to get requests from a web browser and send HTML
back to the web browser. Pure presentation.
In my view, having a three-tier system doesn't mean having three separate
applications. On my project, the presentation and business layers and half
of the data layer are all in one application (because they happen to run on
the same server). But they are in separate classes, and could be easily
split up across multiple applications and even servers, with only the
addition of something like CORBA.
Erik
___________________________________________________________________________
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