I am not using EJB. The model is made using simple JDBC that gets the
database connection from a helper class which uses JNDI to get the JDBC data
source.

How can I apply Session Facade here. Is there any text or code examples
which I can read that talks the same with relation to struts.

regards,
vijay.

> -----Original Message-----
> From: Oshima Tlholoe [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, February 28, 2006 2:53 PM
> To: Struts Users Mailing List
> Subject: Re: which method is better
>
>
> With my rudimentary knowledge,I dont think its advisable for your Action
> classes to talk directly to your business layer/model classes,
> Why don't you
> have a business delegate/session facade or Service Locator sitting between
> your Action Classes and the model classes, this insulates your action
> classes from your business layer and it even makes testing
> simpler. You not
> going to have test cases that span multiple layers.
> Let your Actions pull out data from the ActionForm, wrap it and pass it to
> the Service Locator, then the Service Locator then handles the
> rest, calling
> all the related model classes.
>
>
>
> On 2/28/06, R.Vijayaraghavan <[EMAIL PROTECTED]> wrote:
> >
> > Hello,
> >
> > I usually have set and get methods for all properties in my Model class.
> > After submitting a form, I pull out all the property values
> (form fields)
> > in
> > the Action class from the ActionForm object, set the values of all
> > properties in the model from the action class and then call a particular
> > method in the model class for final submission to the database.
> >
> > I wanted to know thether the above mentioned method is better or is it
> > better to pass the form reference itself to the Model class which then
> > sets
> > the values.
> >
> > In situation 2, I do not have to take care of the various String
> > references
> > that I create. I simply will pass the ActionForm object to the Model
> > class.
> >
> > regards,
> > vijay.
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
>
> --
> Regards
> Name : Oshima Tlholoe
> Cell No: +2773 342 4393
> Tel No : +2712 841 4355(w)
> E-mail : [EMAIL PROTECTED]
> simplicity is the ultimate sophistication
>



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

Reply via email to