On 04-11-2008 at 15:01, Gregg Bolinger wrote: > I know this discussion has come up in the past and I'm not sure how I feel [...] > However, I am in a situation where having more than one binding would be > useful. We are using Sitemesh so when I am dealing with ajax and validation > I can't simply return the error messages because they go through the /* > mapping and get decorated. If I change the UrlBinding and exclude that path > from sitemesh my main page request doesn't get decorated. So I've thought > of the following options: > > 1. Subclass the action class for all ajax related content that I don't want > decorated giving this sublcass a new url binding that whos path is excluded > in sitemesh. > 2. Sublcass the action class for each new url binding I need but leave all > the meat in the parent class. > > >From a design perspective which one sounds better? Is there an option I am > not aware of?
Option 2 sounds better to me, as both classes will have common functionality. Also, it plays better with more than two bindingѕ (the class names will reflect where the meat is). I think this outweighs the need for 3 classes instead of 2 with 2 bindings. Oscar -- ,-_ "[Think before you act.] /() ) Life is hard, but it's a lot harder when you're stupid." (__ ( -- Redd Fox =/ () ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Stripes-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/stripes-users
