I don't think this is an important design decision. The difference between
having one servlet that dispatches to different handlers, and having
different servlets registered is pretty minimal. Either way you are
going to wind up with pretty much the same design, if you drew it as
a picture.
The important design considerations are instead:
-- how do you group the tasks together? it's likely that you want
to have one group of tightly related handlers for each of the
functions you describe
-- how do you separate the look from the feel of your site, for
example are you going to munge it all together in a servlet or
a JSP? or are you going to separate everything out with a
template system like WebMacro (www.webmacro.org)
-- are changes to your site primarily under the control of the
programmers that you have? or under the control of the
engineerng team? or are they all the same people anyway?
if changes are driven by the page designers then you pretty
much need to separate that out and hand tools to the html
folk to give them the power to do that. here's a link for
more on that:
http://webmacro.org/tutorial/tools.html
the basic idea applies to any system, not just WebMacro or
template driven systems.
Justin
Quoting RAD InfoTech ([EMAIL PROTECTED]):
> I have a general design question.
>
> 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
>
> (b) One Servlet for each function (ie., AddServlet,
> UpdServlet, etc.,)
>
> Thanks in advance.
>
> - Balaji
> RAD InfoTech India Private Limited
>
> ___________________________________________________________________________
> 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