The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

The "Working with Action Objects" chapter in Struts in Action" details two alternative approaches to mapping a Form with multiple Submit buttons to Actions:

The first approach mentioned is to map multiple operations to the same ActionMapping/Action (using DispatchAction or LookupDispatchAction).

The second approach mentioned is to map each operation to a different ActionMapping/Action (using DispatchAction, LookupDispatchAction or similar).

As the Action class is an implementation of the Command design pattern I can't help but feel that each Action should implement only one operation. Any common functionality shared by the individual Actions can then be included in a base class which each of the Actions extend.

However, where you have common functionality like CRUD, I can really see the appeal of creating something like a CRUD Action base class which could provide template methods like Scaffold's BaseAction for the major events in the create(), read(), update() and delete() methods' workflow. It is clear to see that Actions like this would lessen clutter by reducing the amount of Actions required by an application (and the amount of ActionMappings), but doesn't this then subvert the whole philosphy of the Command design pattern which Actions are supposedly based upon (i.e. that each Command relates to a single operation)?

But, theoretical concerns aside, what I'm really keen to know is how Struts gets used in the real-world. Do the majority of production Struts applications map multiple opearations to one Action or do they or map multiple operations to multiple Actions?
I really enjoyed the book when I read it a while ago, and found it incredibly useful when trying to put together the build files for a project with several sub/child projects.

However, I know there are features in Ant 1.6 that I could use to greatly improve my build files (e.g. import task), but a brief read through the "New Ant 1.6 Features for Big Projects" article has left me wondering where to start, and also seemed to have left a couple of things out, like dealing with inter-dependencies. Therefore I was wondering if you had any advice to offer on this, and also if might know where I could find a sample build file that uses these new features to good effect?

Thanks in advance,
Lawrie.
Many thanks for the info - I've had a quick look at the "Meeting new Challenges with Ant1.7" presentation and it has certainly given me food for thought. It has also really whetted my appetite for both Ant 1.7 and the 2nd edition of JDwA, so I hope I haven't got too long to wait...

Lawrie.