On Thu, 11 Jul 2002, Adam Young wrote:

> Date: Thu, 11 Jul 2002 12:10:34 -0700
> From: Adam Young <[EMAIL PROTECTED]>
> Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]>
> To: Struts Users Mailing List <[EMAIL PROTECTED]>
> Subject: RE: Re: Struts + EJB ?
>
> Seems to me the real solution would be to put a session layer between the
> entity and session beans.  The sesion layer would expose a serializable
> JavaBean that the form could wrap, and the session bean would be
> reponsible for building and processing the serialiable bean.  Trying to
> get struts to do all thios for you prevents you from interjecting any
> business logic into it at all.
>

On some apps where I've built a DAO layer (for example, with something
like a getCustomer(String customerId) method), I've built caching directly
into the DAO itself, and the used the DAO from the view layer to retrieve
needed information.  The nice thing about this is that it's transparent
to the code in the view layer that retrieves customers -- in fact, you can
do a simpleminded database lookup every time at first, and then implement
caching later if you find it to be a performance bottleneck, without ever
touching your view layer code.

>
> Adam Young
> Lead Programmer
> RTZ Associates
> 510-986-6700
>

Craig


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to