One servlet for add/delete/update is better design to me. Make
the html form in such a way that you can get an option variable
which will indicate what to do. Bob's design of interface servlet
also supports that.
Sandip
On Wed, 27 Sep 2000, Hills,Robert wrote:
> Date: Wed, 27 Sep 2000 13:54:23 +0800
> From: "Hills,Robert" <[EMAIL PROTECTED]>
> Reply-To: A mailing list for discussion about Sun Microsystem's Java
Servlet API Technology. <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Subject: Re: Better Servlet Design
>
> Hi,
>
> > -----Original Message-----
> > From: RAD InfoTech [mailto:[EMAIL PROTECTED]]
> > Sent: Wednesday, 27 September 2000 13:32 PM
> > To: [EMAIL PROTECTED]
> > Subject: Better Servlet Design
> >
> > 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?
>
> I can't say that I'm one to judge if this is the "best" design, but it works
> for us. We have an app that has a number of forms, each of which allows the
> user to view, update, add and/or delete a specific type of record (roughly
> corresponds to a single DB table). In essence, we have 3 servlets for each
> "form":
>
> 1. A Datastore servlet - responsible for accessing the data required by
> the form.
> 2. A business object servlet - responsible for any busines rules,
> translations etc.
> 3. An interface servlet - responsible for interacting with the user.
> In this form, we have add, edit and delete buttons depending on what rights
> the user has for that form.
>
> HTH,
>
> Rob Hills
>
> Contract Developer
> World Class Customer Satisfaction - Retail Product Management Project
> Western Power Corporation
> Western Australia
>
> x2311
>
> Senior Consultant
> Netpaver
> http://www.netpaver.com.au
>
> Disclaimer: The opinions expressed in this message are my own and not those
> of the Western Power Corporation.
>
> ___________________________________________________________________________
> 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