Ted Husted wrote:
Of course, if you use one-action-method per Action-class, then all the
annotations work just fine.

+1 on one-action-method per Action class.

My personal opinion (after nearly 5 years of heavy WebWork/s2 use) is that this is the best-practice and that multiple action methods per Action class should be a rarity.

For some reason folks new to s2 seem to get it backwards and want to stuff a bunch of Action methods into a single Action class.

There's a lot of downsides to that (as this post and another recent post both illustrate) and there are few upsides. And the upsides you might think are upsides (like code sharing between Action methods) are often not the upsides you think they are. If you're sharing lots of code between Action methods, it's my experience that code belongs in other classes or even in other tiers.

My first WebWork app had a small number of Actions and lots of Action methods. I came to regret it.

My latest s2 apps have one-action-method per Action class. Religiously, no matter how silly it might seem to write a do-nearly-nothing Action. I'm much, much happier this way and the app is way more self-documenting.

Just my $.02.

- Gary

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to