On 2/19/06, Craig McClanahan <[EMAIL PROTECTED]> wrote: > On 2/19/06, Michael Jouravlev <[EMAIL PROTECTED]> wrote: > > In Struts Classic prior to 1.3 a client calls a concrete action (which > > is why I consider Struts Classic to *not* be an implementation of > > Front Controller pattern). > > Almost, but not quite ... there was always processng going on before and > after the call to the action, and you couldn't bypass it except where Struts > allowed you to explictly configure bypassing it (like turning off > validation). For someone who doesn't use form beans (like you, Michael? :-) > there isn't a lot actually done there, but it does exist.
I know that I cannot bypass it. And I think it sucks big time. This is the ultimate flaw of Struts. I value the framework, it does job for me. But let me push the buttons, switch the levers and pull the strings, ok? I appreciate, for example, a chunk of code that populates form bean from the request. But let me call populate() myself. I appreciate validator, but let me call validate() myself (this I can do, thank you). It is not a big deal for me to write couple of lines of code, but the code looks simpler, I can immediately see what happens without looking into deployment descriptor... I mean, into struts-config.xml. I do use form beans. I use them in session scope. > The primary change in 1.3 is to re-implement the standard request processor > pipeline as a chain instead of a monolithic single class (in other words, > promoting the sandbox CoR implementation into the mainstream). So, the use > of a chain is just an *implementation detail* that does not change the > "Front Controller" nature of the original framework. But it's now much > easier to customize the framework's behavior for all requests, by adjusting > the definition of the standard chain and/or utilizing optional call-outs to > applicaton defined chains. > > The next step would be to provide customizable chains per Action (becoming > even more like how you configure actions in WebWork) -- but you can even do > that today by using an Action that itself executed a chain. Why is it always like this? Either everything is done for me (and I can do little about changing what's happening), or it is super-duper configurable system? I do not need super-duper. There comes request with arguments. There is my action (or command, or chain, does not matter) which is *an endpoint of the request*, because this is how it is defined in struts-config.xml file. Great. Now just call this endpoint, and provide me with dozen or so lifecycle methods, that I can call myself. This would be so much easier than bolting on the whole CoR pattern and then customizing it. Is it possible to have something both extremely simple *and* extremely flexible? Guess this is just a Tuesday rant... Michael. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
