On 30/10/2012 12:31, Jan Bernhardt wrote:
> Hi @all,
>
> I'm currently working on replacing Spring Webservice Stack with CXF. By doing 
> this I discovered a couple of issues, that I would like to discuss here.
>
>
> 1.       Syncope's REST API is only defined throw classes. My suggestion 
> would be to extract Interfaces from these Classes and place these in a new 
> package 'org.apache.syncope.core.rest.api'. All REST and security annotations 
> would be located with the interface.
> By doing this we would have a better chance to provide a stable REST 
> interface and allow others to provide their own implementations.

+1
I would also:
 1. move this new package 'org.apache.syncope.core.rest.api' to
syncope-client module
 2. refactor all syncope-console classes '*RestClient' to implement the
new APIs and move such refactored classes to syncope-client module as well

> 2.       Since replacing the WS-Stack will affect many classes, I would like 
> to use this opportunity and also refactor the REST URLs to become more 
> RESTfull-Style. Currently there are URLs like '/create', '/update' and 
> '/delete/{roleId}'. I would like to refactor this to use matching HTTP 
> Operations (e.g. POST, PUT and DELETE), instead of coding the operation name 
> inside the URL.

A big +1 for this.

> Of course this will have a major effect on the REST API, but from my point of 
> view, these changes should be done rather sooner than later (before many 3rd 
> party solutions are using Syncope).
> Of course we could make sure that this new REST API could still be backwards 
> compatible, but I would rather deliver the new REST API with sufficient 
> documentation within the next major release and not clutter the new 
> interfaces with backwards-compatible code.

I wouldn't care about backward compatibility: we are making this change
for a new major version, and the new client classes (mentioned above)
should make things really smooth.

Regards.

-- 
Francesco Chicchiriccò

ASF Member, Apache Cocoon PMC and Apache Syncope PPMC Member
http://people.apache.org/~ilgrosso/

Reply via email to