Christian - I pretty much do the same thing. I think it's usually advisable to begin with plain Java interfaces to expose business methods, as this will make it easy if you ever needed to expose your biz objects as EJB's (you can sub-interface), or web services (a good ws framework will let you reuse the Java interface), or something else that requires remoting. If you have an app for which that's never going to need to happen, it would seem reasonable to just have some dao's and let your WW actions interact with those. But it's really not much trouble to create business interfaces, and it does result in WW actions that are very simple. WW still takes care of a lot of work for you: collecting data from the user, mapping the data from the request to the attributes in your Action, and then you write the validation and then call the appropriate business method.
 
Rob
----- Original Message -----
Sent: Wednesday, May 28, 2003 8:48 PM
Subject: [OS-webwork] WW actions and your business logic in servlet env (no ejb)

Hi all,
 
i wonder where do you put your business logic ? I would put it in some POJO which manipulate my domain model, at the end WW actions are thin adaptater between my application and a browser based client. With this, actions know nothing about the persistence of my domain model, they are just validating user input amd then delegate.
 
However i wonder if it's not "too much" moreover WW actions are not tied with J2EE and therefore i could reuse my actions with a swing based client or whatever. How do you guys do ?
 
Regards
Christian Meunier

Reply via email to