So, as this discussion seems to be winding down, I thought it might be interesting to share that it turned out to be surpassingly easy to implement the features I needed as extensions to the struts-core. This is good, of course, because it lets us defer decisions that raise strong opinions until there is some experience to guide them, but also because it really proves the model we are pursuing.

Of course, everyone knows that I "drank the chain kool-aid" a long time ago, but still, the fact that I was simply able to drop two new commands in the chain and have a completely different model for plugging in control logic is pretty exciting.

For the record: Since what I wanted looked more like a Command, I dropped the extension to CreateAction. Instead, I wired Spring to produce instances of DispatchCommand (in the commons-chain SVN repo), and I wrote a pair of commands: one which copies any bean out of the Spring ApplicationContext into the Chain Context, and another which extends LookupCommand to get its command out of the Context instead of by looking in a catalog. (I did finally exercise that idea of using a JEXL to evaluate an expression so that the CopySpringBeanToContext command could be more generic and less bound to the specific case where I want to use a context-specific property (actionConfig.path) as the lookup name in Spring. It works like a charm.) Now I just leave out the "type" attribute of my action mappings and my new commands achieve the equivalent of "CreateAction/ExecuteAction", but in a way which makes my ActionContext more readily available to my controller logic.

So, for anyone who has had strong feelings on this thread, the lesson is this: we're making good strides towards making Struts as flexible as you want it to be, so if you want to totally throw away Actions, you can do it. Jack, if you want to throw away ActionForm -- go for it! The fact that you can include a chain-config.xml in a JAR means that it should even be easy for people to package and distribute alternatives which can be plugged in with a minimum of fuss just by including the JAR that has the custom commands and changing web.xml. (Now that I think about it, this might terrify the people who were arguing that there needs to be something to have a framework... but I think it's great.)

Joe

--
Joe Germuska
[EMAIL PROTECTED]
http://blog.germuska.com
"Narrow minds are weapons made for mass destruction"  -The Ex

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



Reply via email to