I like stripes' simplicity, but I often run into a maintenance problem I
don't know how to solve:

I have a handler in an action bean that needs a field that none of the
other action beans need.  Worst case scenario, one handler uses half the
fields and another handler uses the other half.  Here's an example:

You have a DogActionBean.  It has a handlers for listDogs and viewOneDog.
 listDogs shows you the list of created dogs.  viewOneDog lets you see the
details of one of those dogs.  viewOneDog needs to know which dog its
viewing to populate the jsp so it has a private Dog dog field.  This is
completely unused in listDogs.  This feels like a code smell.  What's the
solution to this?

I'm playing the devils advocate.  I think the solution is to have finer
grained action beans.  There should be a ViewOneDogActionBean and a
ListDogsActionBean.  At least that's what I'd assume. If I'm right, I'd
think having multiple event handlers in one action bean would be the
exception, not the norm.

-- 
Thanks,
Dan

-- 
CONFIDENTIALITY NOTICE: The information contained in this electronic 
transmission may be confidential. If you are not an intended recipient, be 
aware that any disclosure, copying, distribution or use of the information 
contained in this transmission is prohibited and may be unlawful. If you 
have received this transmission in error, please notify us by email reply 
and then erase it from your computer system.
------------------------------------------------------------------------------
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today. 
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
_______________________________________________
Stripes-users mailing list
Stripes-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/stripes-users

Reply via email to