Sorry Don, it's getting late and I dashed off that last answer before I understood what you'd written :O

I realised while brushing my teeth, it should be possible, instead of <interceptor-ref> to have something like

<interceptor ref="">

or

<interceptor>
  <ref>

<interceptor-ref> is /so/ ugly.


Don Brown on 25/07/06 00:34, wrote:
A quick word about interceptors.  The purpose of Interceptors is to
allow you greater control over the controller layer, specifically
common logic that applies to multiple actions.

80% of applications shouldn't need to define their own interceptors,
as the default stack should do what you need.  Think of the default
interceptor stack as the Struts RequestProcessor.  Most Struts
applications have no need to define their own request processor.

Of the remaining 20%, I'd guess 80% or so of those applications need
to define specific interceptors for specific actions.  Most of the
time, you can define an application-specific application, place that
interceptor in a new default stack, then have that stack the default
for all your packages.

Therefore, only a small percentange really need the ability to define
interceptors at the action mapping level.  If you find yourself using
the interceptor-ref element a lot, ensure that you couldn't avoid that
by setting a default interceptor stack for the package, or even if you
need a custom interceptor stack at all.  If you find yourself really
needing the advanced use of interceptors, the name 'interceptor-ref'
will be valuable as it signifies an interceptor defined elsewhere that
you are referencing.

Don

On 7/24/06, Frank W. Zammetti <[EMAIL PROTECTED]> wrote:
interceptor-element?

Ted Husted wrote:
> On 7/24/06, Adam Hardy <[EMAIL PROTECTED]> wrote:
>> Guessing how busy you are, you may not be interested, but I think it's
>> pretty
>> obvious that the more user-friendly a name is, the more it will be
>> used by the
>> community.
>>
>> Interceptor-ref probably describes exactly what it is in framework
>> architecture
>> terms, but something like 'goal', 'phase', 'execution' or 'command' will
>> undoubtedly be alot better received. (I grabbed those from the maven
>> vocab, in
>> case you didn't notice).
>
> The obvious name is interceptor-stack, but the DTD uses that for
> another purpose. The interceptor-ref can be a single interceptor,
> another interceptor-ref, or any combination of the two (e.g., a
> composite). It's role in the framework is to create what Struts 1
> calls the "request processor" or "controller". In Struts 1.3, the
> request processor is a chain of commands, and, so, conceptually very
> close to an interceptor stack.
>
> A syntatically sweet name might be "controller", but since it's
> implemented as a composite of interceptor stack, that name would mask
> what it is doing, and probably make it harder to use.
>
> <interceptor-stack-composite> might  be the most descriptive, but it's
> a lot to type, and the DTD is designed to be keyboard friendly.



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

Reply via email to