I also bounced this off of a couple other people over the last day or to.. there seems to be a general consensus from folks that I talked to that its a good idea to try and group all the CRUD (Create, Read, Update, Delete) actions on objects grouped into a single action. On that note, it would be good to standardize the method names as well, perhaps to: public String add() {} public String update() {} public String view() {} public String remove() {} Then we would have the decision of the xwork.xml which could have actions for each of these methods on the class, like or on the jsp's we could just use the shortcut of how does this grab folks? I think this is a valuable step in things since it will give us a chance to audit all of the actions, improve the -webapp project for contributors...and -webapp is a great place for people to start with continuum...and it will also serve as a good swift kick towards finishing off the testing work that emmanuel will be committing soon. jesse On 10/25/06, Rahul Thakur wrote: > Jesse and I tossed some ideas about having some sort of consistent > patterns for writing Webwork actions in Continuum. Below is a transcript > from yesterday's chat. We wanted to bring this up for discussion and > would be great to have any ideas/suggestions other might have. > > Cheers, > Rahul > > > > hello there > heya > just had some ideas that I wanted to jot down here quickly > shoot > ok, here goes (and pls bear with me if I have to go check on > breakfast :) ) > ok, i have quick run thru of the patterns/conventions that we > are using in our internal framework > starting with xwork.xml , the equivalent config.xml is broken up > into 3 files > 1) defines components - lets call it components.xml > 2) defines pages (that are composite of layout templates + > components) , lets call it pages.xml > 3) defanes action patch mappings (page flow) - lets call it > mappings.xml > 1) follows convention that all component names are prefixed with > 'component.' - ex: 'component.group.notifier.edit' > 2) has page names prefixed with 'page.' - ex: > 'page.notifier.summary' > action mappings are pretty much similar to what is there in > xwork.xml currently - i will come to method name later > i am just rattling off here with notes :) - you will have to > help me see these elements can/do map to WW or can be made to map > Components are supported by component handlers - that prepare > the display of and help render components - The java classes are > suffixed XXXComponentHandler. I have come across this with notifiers > Action classes are ManageXXXXAction - that process requests > for - edit/update/delete. I think the create one is different (I will > have to check again) > methods in ManageXXXAction follow convention (like I > mentioned) - processEditRequest, processUpdateRequest, > processDeleteRequest > and validations are performed in the actions themselves (but I > like what WW does from validation.xmls) > for 'result' returned from the action - 'success' and 'failure' > are by default available and another convention is 'failure.system' for > any internal errors > other results can map to the action request - 'success.edit' , > 'success.delete' - I am adding this from my end :) > so, what do you reckon? > sorry i haven't been able to put it in an email yet > reading latest > I have actually been kicking around something brett mentioned a > while back about generating actions automatically for CRUD things > and I talked to patrick lightbody and he was a fan of all CRUD > operations being in one object > which was where I had started out > which seemed to be what your detailing up here > so I think I would do ProjectNotifierAction and > GroupNotifierAction > with associated add/edit/view/remove methods > cool! is it possible to structure xwork.xml like I said above? > not sure about the need of the success.edit stuff > you could do that by having one action and using the > action|method syntax in the jsp > or just have multiple actions referencing the same class and > using the method="x" attribute > ah, you are right :) > ok, i gotta run in a minute. do you still want to put this on > the list? > its probably worth it > ok, mind if I just stick in the transcript with a little > background? > you have my authorization :P > aye cap'tn :) > thanks! - i gotta run for work now > cheers > laters > > > > > -- jesse mcconnell jesse.mcconnell@gmail.com