[ 
https://issues.apache.org/jira/browse/SHINDIG-268?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12600319#action_12600319
 ] 

David Primmer commented on SHINDIG-268:
---------------------------------------

Regarding URL templates
I agree that the info needed to be manually copied from the spec, and since it 
was not being used in the codepath, had a chance of getting out of date. 

I'm not such a fan of auto-generating it. URL templates are not the same thing 
as the Route patterns. I suppose as a way of specifying the static parts of the 
url and basic variable names you could do some sort of : > {} thing but that's 
little help in the end.

I put the url templates into the enum for two reasons: documentation and for 
generating the discovery doc.

1 docs. Ok. this is a rather lame one but I thought that for people new to the 
routes style templates, there would be some confusion about how they related to 
the url templates in the spec, so I wanted the url template from the spec to be 
there. Now I realize that those templates are just examples of how you could 
implement the spec, and the discovery doc takes care of "explaining" the server 
implementation's relation to the spec, so it's really about the discovery doc.

2 generating the discovery doc. This one is getting more relevant now that it 
was added to the spec and there are a number of ways we could use a central 
place to record the url patterns and configure the server. (Abdera does this 
for an atom service doc). The disco doc's url templates will have much more 
info than the collection urls, as they include optional params, so having them 
in the enum does not get us all the way there for generating this doc. So I'm 
torn. I'd originally just had the url templates in code comments so I'd be 
happy with them going back into comments. Are you worried about them getting 
out of date in the comments?

davep


> Refactor Route managment in the provider
> ----------------------------------------
>
>                 Key: SHINDIG-268
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-268
>             Project: Shindig
>          Issue Type: Improvement
>          Components: RESTful API (Java)
>            Reporter: David Primmer
>         Attachments: exampleUsage.txt, 
> shindig-268_refactor_route_managment.patch, useGuiceForRoutes.patch
>
>


-- 
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