>Requirement: Need to have a servlet that takes care
>of listing, adding, updating and deleting employees.
>
>Which is a better design?
>
>(a) One Servlet that handles these various functions
Not a good solution would become MONOLITHIC.

>(b) One Servlet for each function (ie., AddServlet,
>UpdServlet, etc.,)
Not a good solution as you would have too many entry points
to ur application , thus making security, application state,
and presentation harder to maintain.

If you are looking for a strictly Web solution having just Web-tier
components i would recommend you to use the following architecture.

Controller Servlet/JSP that recieves all the web request for the application
and work with Beans components for the business logic and application state
and then forwards the
request to respective response generating Java Server Pages (JSP).

I would suggest you use JSP pages instead of Servlets for generating HTML
responses.
They were concieved for the benefits they provide over Servlets.

Check http://java.sun.com/products/jsp for more information.


-Shiraz Wasim Zaidi>

___________________________________________________________________________
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