[ 
https://issues.apache.org/jira/browse/TAP5-69?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12663538#action_12663538
 ] 

Howard M. Lewis Ship commented on TAP5-69:
------------------------------------------

The goal for this is that, should the service id change, none of the 
contribution methods to that service be affected.

This is reflective of the overall direction of the framework, where 
increasingly, services are identified by the combination of type plus one or 
more marker annotations, rather than by service id.

However, currently (5.0) contribution methods are linked to services by the id, 
which is incorporated into the method name.

The goal here is to use @Contribute (to specify the service interface) plus 
marker annotations and no longer care what the name of the contribute method is.

> Add annotation, @Contribute, to allow service contributor methods to be 
> arbitrary named
> ---------------------------------------------------------------------------------------
>
>                 Key: TAP5-69
>                 URL: https://issues.apache.org/jira/browse/TAP5-69
>             Project: Tapestry 5
>          Issue Type: Improvement
>    Affects Versions: 5.0.15
>            Reporter: Kalin Krustev
>            Assignee: Igor Drobiazko
>
> Tapestry used to require this naming convention for configuring services:
> public static Foo buildFoo(...) {...}
> public static void contrubuteFoo(...) {...}
> Then it allowed the first convention to be simplified as:
> public static Foo build(...) {...}
> It would be nice for the "contribute..." methods to allow also simpler naming 
> and use the type of the "configuration" parameter to determine the configured 
> service, which will also have the same type of parameter.
> For example:
> in Tapestry 5.0.5 TapestryModule.java:
>     public ServletApplicationInitializer build(...,  
> List<ServletApplicationInitializerFilter> configuration, ... )
> in my AppModule.java Tapestry 5.0.5 requires this naming:
> public void 
> contributeServletApplicationInitializer(OrderedConfiguration<ServletApplicationInitializerFilter>
>  configuration)
> Perhaps it could be simplified as:
> public void 
> contribute(OrderedConfiguration<ServletApplicationInitializerFilter> 
> configuration)
> If it will not be simplified, it would be nice to make the documentation 
> about Tapestry IoC Configurations more clear that
> the naming of the contribute methods is important, not the type of 
> configuration parameter.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to