> > but if you want to model best practices, then you > have to ask "why > > would you be intent on calling Actions"? I'm not > trying to build > > walls so that people can't just get-the-job-done, > but I do know from > > experience that people tend to overload Actions > with too much > > business responsibility, and integrating DWR with > Struts would only > > encourage that. > > > > Would you rather prefer to have your requests served > directly by your > services? Or by the domain model objects? I think > that an action is a > pretty good idea of a gateway. >
Ok, so here's one reason why: Type Conversion My actions often use domain objects directly, and I'm able to have a property named "user" which calls the setUser() method, but the type conversion takes care of doing the database lookup to get the User object based on the HTTP parameter, which is just an ID. I'm not that familiar with how DWR works under the covers, but I've got to think I'd have to write another set of type converters to get the User instance loaded from the database and ready for updating. --------------------------------------------------------------------- Posted via Jive Forums http://forums.opensymphony.com/thread.jspa?threadID=32216&messageID=62400#62400 --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]