I agree with encapsulating the business logic into reusable components, but
I am also wrestling how to do it.

My thoughts are to use class packages and EJBs for business objects.  Class
packages being used locally on the web server where objects are of lighter
weight and EJBs for more complex objects, where I can gain some benefits,
like caching, from the EJB container.  Servlets/JSP would be used for
building the web application with all presentation code being handled in
JSP.

The trick I see here is getting the business level reuse while keeping
overhead at an acceptable level.

One question I have, is why use a JavaBean over a class object?

> -----Original Message-----
> From: DAVE TOWNSEND [SMTP:[EMAIL PROTECTED]]
> Sent: Monday, September 13, 1999 5:35 AM
> To:   [EMAIL PROTECTED]
> Subject:      Re: Why use JavaBeans?
>
>         JavaBeans are reuseable components. That seems a good enough
> reason
> as any to me. For example, lets say you have a server with a database
> running on it, with various information about customers. You have already
> written an application in Java that uses a bean to query the database and
> provide some information. Suddenly, your specification changes and it
> needs
> to be accessible from the web. With JSP, you can use the same bean as the
> application does to access the database, usually with little or no code
> change. And vice versa for converting a web-based app to a standard app.
>         Converting the standard app into a servlet would usually take
> longer. Ok, so most of the code can be reused, you still need to copy and
> paste it into the right places in the servlet, perform testing to ensure
> that everything is done right, etc. With beans, you know that the bean
> works
> and will work whether you call it from a JSP, or from a standard
> application.
>
> Dave
>
>
> > -----Original Message-----
> > From: O'Keeffe Patrick [mailto:Patrick_O'[EMAIL PROTECTED]]
> > Sent: 13 September 1999 10:16
> > To: [EMAIL PROTECTED]
> > Subject: Why use JavaBeans?
> >
> >
> > Hi,
> >
> > I'm an ASP developer who is trying to put forward a case for using the
> > JSP/Servlet/JavaBean approach. I'd be very grateful if
> > someone could explain the
> > following to me:
> >
> > What is the advantage of using JavaBeans with servlets and
> > JSPs when the same
> > result could be obtained by chaining servlets and JSPs? Both
> > approaches separate
> > content from presentation. Granted, the latter places more
> > strain on the web
> > service, but is there some other argument for involving JavaBeans?
> >
> > This might be a basic question, but any elaboration would be greatly
> > appreciated.
> >
> > Many thanks,
> >
> > Patrick O'Keeffe
> > Consultant
>
> ==========================================================================
> =
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> JSP-INTEREST".
> FAQs on JSP can be found at:
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.html


********************************************************************************
Bear Stearns is not responsible for any recommendation, solicitation, offer or
agreement or any information about any transaction, customer account or account
activity contained in this communication.
********************************************************************************

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html

Reply via email to