Re: Action declaration question (Webwork/Hibernate)

Konstantin Pribluda <[email protected]> Sun, 17 Dec 2006 10:12:15 CST
Newsgroups gmane.comp.java.open-symphony.webwork
Message-ID <20480704.1166371966135.JavaMail.os-j2ee@opensymphony01.managed.contegix.com>
> Do you also call the DAOs directly from the
> respective actions? Or do you use a kind of wrapping
> class to access them?

Of course it depends of what do you call "DAO" - in my case I put some business logic inside,
and call them from actions. You may also choose to have pure CRUD classes, and then wrap them by business logic. 

You may as well to choose to put all that logic into actions itself.

However, I perefer to keep my business logic separate from web tier, because 
there may be a need for non-web usage of this logic ( commandline utils for , say, 
import / export etc. ) 

My view of an action is that it has to manage presentation logic, check parameters for sanity and sometimes control access to information, and then delegate to business tier. 
( which could be as well accessed remotely if necessary with a kind of magic provided by IoC/DI containes. )
---------------------------------------------------------------------
Posted via Jive Forums
http://forums.opensymphony.com/thread.jspa?threadID=53761&messageID=108370#108370

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]