There is little doubt that an application that uses
some o/r persistence mechanism will perform slower
than one that does not (all else equal). For my
team, the deciding factor was flexibility. Using an OO
programming language gives us flexibility in our
object model - reusable code, polymorphism ect.. What
we lacked was the flexibility to change our data model and
business logic without changes our Business Object model. As our
business changed we found that changes in our data
model were driving changes in our object model (I'm an
object guy, so I did not like this at all). As an
application developer I develop business logic -
truthfully I don't care how the data that I operate on
is persisted. Thus, I don't want to have to change my
code when the underlying persistence model changes.
That was the deciding factor for us.

We decided on Castor, but we had a camp that preferred
the EJB Bean Managed persistence model for the sole
reason that EJB has a proven mechanism for handling
concurrent access - synchronizing access to a
singleton is hardly a match for it.

Depending on how much time you have to devote to the project it may
not be worth the trouble. We like it, but it is not for everyone.

cheers.
Aaron O'Hara wrote:

> erik,
>
> I'm a seasoned DBA turned application developer and I'm having a hard time
> letting go of SQL statements.  I've centralized all database calls in a
> singleton DB API.
>
> What is the major deciding factor that makes the push to o/r mapping
> necessary?  Going to an o/r mapping seems labour/time intensive and at the
> cost of db performance.  Any advice?
>
> Aaron
>
> -----Original Message-----
> From: erik morton [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, April 24, 2001 1:15 PM
> To: [EMAIL PROTECTED]
> Subject: Re: Developing an N-tier system
>
> This is not a web development question any longer! Now you are talking about
> serious OOP issues that many web developers have never had to deal with. My
> best
> advice to you is to read the papers on the links that I sent you. We grapple
> with
> this issue everyday and it never gets any easier. Our solution has been to
> combine
> Ambler's methods with classic GOF design patterns. And don't underestimate
> the
> importance of XML.
>
> Try out the following: http://www.cetus-links.org/.
>
> Aaron O'Hara wrote:
>
> > What major considerations are there in choosing a solution to implement
> > object to rdb mapping?
> >
> > Aaron
> >
> > -----Original Message-----
> > From: erik morton [mailto:[EMAIL PROTECTED]]
> > Sent: Tuesday, April 24, 2001 12:21 PM
> > To: [EMAIL PROTECTED]
> > Subject: Re: Developing an N-tier system
> >
> > The biggest advantage that I can see for using JSPs instead of Servlets
> for
> > the
> > "workflow" layer is Rapid App Development - that's it. As a previous
> reader
> > pointed
> > out, Servlets are true objects where JSPs are really just a temporary
> > concept that
> > are translated into actual servlets at deploy/runtime. On the other hand,
> if
> > you
> > place ALL of your business logic inside beans than I see little need for
> > servlets.
> > But you must put ALL of the logic in the beans - I don't want to see a
> > single IF
> > statement in those JSP pages and don't even think about accessing the
> > database :-).
> > I said it before and I will say it again: spend time working on your
> > persistence
> > model. The truly robust systems that I have seen have persistence models
> > where you
> > can change the data model all you want and you never recompile your code.
> As
> > a rule
> > of thumb, we never embed SQL in the middle tier.
> >
> > You can call me Captain Obvious if you want.
> >
> > some links:
> > http://www.ambysoft.com/
> > http://www.castor.org/
> >
> > Aaron O'Hara wrote:
> >
> > > All,
> > >
> > > I'm designing an N-tier application and would like some feedback,
> > comments,
> > > notes from the field.  I have tried to layer my design as follows:
> > >
> > > JSP/HTML - presentation layer
> > > Non-Gui JSP - workflow layer
> > > Scope Beans (page, request, session, application) - business logic
> > > Psuedo Entity Beans - persistence layer
> > > DB API - database services
> > >
> > > In the presentation layer, I either present information to the user or
> > > receive form information.  All the form submissions go to the workflow
> > layer
> > > which calls the necessary business logic beans to determine what should
> > > happen next.  The business logic beans retreive or save data using the
> > > psuedo entity beans.  (I say psuedo because this in not a EJB entity
> bean,
> > > but an object that maps to a corresponding table in a database).  All
> the
> > > entity beans perform their database operations via a singleton class,
> the
> > DB
> > > API.
> > >
> > > I'm looking for a critique or comments from people about the design I've
> > > adopted and implemented.
> > >
> > > Aaron
> > >
> > >
> >
> ===========================================================================
> > > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> > JSP-INTEREST".
> > > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
> > DIGEST".
> > > Some relevant FAQs on JSP/Servlets can be found at:
> > >
> > >  http://java.sun.com/products/jsp/faq.html
> > >  http://www.esperanto.org.nz/jsp/jspfaq.html
> > >  http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
> > >  http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
> >
> > --
> > Erik I Morton
> > Software Developer
> > ------------------
> > CommerceHub
> > http://www.commercehub.com
> > 518-886-0704
> > 21 Corporate Drive
> > Clifton Park, NY 12065
> >
> >
> ===========================================================================
> > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> > JSP-INTEREST".
> > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
> > DIGEST".
> > Some relevant FAQs on JSP/Servlets can be found at:
> >
> >  http://java.sun.com/products/jsp/faq.html
> >  http://www.esperanto.org.nz/jsp/jspfaq.html
> >  http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
> >  http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
> >
> >
> ===========================================================================
> > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> JSP-INTEREST".
> > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
> DIGEST".
> > Some relevant FAQs on JSP/Servlets can be found at:
> >
> >  http://java.sun.com/products/jsp/faq.html
> >  http://www.esperanto.org.nz/jsp/jspfaq.html
> >  http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
> >  http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
>
> --
> Erik I Morton
> Software Developer
> ------------------
> CommerceHub
> http://www.commercehub.com
> 518-886-0704
> 21 Corporate Drive
> Clifton Park, NY 12065
>
> ===========================================================================
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> JSP-INTEREST".
> For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
> DIGEST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.html
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
>
> ===========================================================================
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
> For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.html
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

--
Erik I Morton
Software Developer
------------------
CommerceHub
http://www.commercehub.com
518-886-0704
21 Corporate Drive
Clifton Park, NY 12065

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to