struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeromy Evans <>
Subject Re: [VOTE] Bring Convention plugin into trunk and deprecate Zero Config
Date Sat, 17 May 2008 02:40:08 GMT
What I meant is that with some effort, instead of the convention plugin 
providing both Configuration and Mapping/Invocation is could be split 
into two: a plugin that provides config via annotation and a plugin that 
provides mapping & invocation conventions.  If that were the case then 
developers could separately chose the configuration approach (annotation 
or xml) and the mapping and invocation approach (plain or restful).  It 
was just an idea.

(And yes, with the right settings, REST can invoke actions defined in 
XML config when they have the appropriate methods as all 
action/controller definitions come from same Configuration instance).

Musachy Barroso wrote:
> My head is spinning now :). Can you use REST with Xml Conf?
> musachy
> On Fri, May 16, 2008 at 2:30 AM, Jeromy Evans
> <> wrote:
>> Jeromy Evans wrote:
>>> I wouldn't rush into this decision.
>>> Users of the REST plugin require @Namespace, @Result, etc annotations.
>>>  Creating a duplicate set of annotations with the same purpose is not
>>> sensible.
>>> It's appropriate that the REST plugin has a dependency on the plugin that
>>> auto-populates the Configuration, despite the contrary statement on the
>>> plugins page.
>>> Merging the REST plugin with Convention is also not possible as the
>>> implementation of ActionInvocation and ActionMapper are entirely different
>>> (the conventions cannot currently be mixed).
>>> There are several issues here:
>>>  - creating a Configuration (via XML, via Annotation)
>>>  - ActionMapping (no problems here, each plugin sets up their own)
>>>  - ActionInvocation (standard or RESTful; they are incompatible)
>>>  - handling unknowns
>>> One situation could be that Configuration is separate from Convention; so
>>> the developer can choose how the Configuration is setup and then choose
>>> which mapping & invocation, and unknown handling approach to use. However
>>> that would require another refactoring.
>>> I think making REST dependent on the Convention plugin is the way to go,
>>> such that the Configuration is created by Convention (but customized for
>>> REST *Controller class) and extended with the REST ActionMapper and
>>> RestActionInvocation.
>> On further thought, if it is possible to split up the Convention plugin,
>> then it could be solved like so:
>> - Zero Configuration: for all annotations relating to the setup of
>> Configuration (merge from Convention)
>> - CodeBehind: implements action mapping, invocation, unknown handling, index
>> handling (the other half of Convention)
>> - REST alternative implementation of action mapping, invocation, unknown
>> handling
>> Ideally then REST can be used with ZeroConf or XMLConf, or CodeBehind used
>> with ZeroConf or XMLConf.  Sweet.
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail:
>> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message