Hi,
I would like to propose a small re-organization of the rest module.
Currently the module is organized as follow :
xwiki-platform-rest/
\_xwiki-platform-rest-model/
\_xwiki-platform-rest-server/
Where xwiki-platform-rest-model contains the JAXB bindings and
generates model classes ; and where xwiki-platform-rest-server
contains "everything else", being the Restlet plumbing to expose a
REST application, and the REST resources and representations that
makes the XWiki REST API.
I'm proposing a first re-organization going towards the following structure :
xwiki-platform-rest/
\_xwiki-platform-rest-model/
\_xwiki-platform-rest-resources/
\_xwiki-platform-rest-server/
Where xwiki-platform-rest-model remains the same, and where everything
that is not needed to expose a functional REST system is extracted out
of xwiki-platform-rest-server and into xwiki-platform-rest-resources.
With this, xwiki-platform-rest-resources would become the actual
implementation of the XWiki Restful API, while
xwiki-platform-rest-server will be the module needed to expose any
REST API from XWiki.
The rationale behind this is simply to ease implementation of
alternate APIs while keeping benefits from the server module which is
agnostic to any API exposed.
My +1 for this. If we agree I can push it early in the 3.2 cycle (in a
couple of days).
WDYT ?
----
Note for the future :
In the future we could want to split the REST module even more. Right
now some parts of the module are tied to Restlet, but resources aren't
(basically everything in org.xwiki.rest.resources), and we could
extract them out in a generic module while introducing a restlet
module for everything Restlet (server plumbing + representations). It
could for example look like this :
xwiki-platform-rest/
\_xwiki-platform-rest-model/
\_xwiki-platform-rest-restlet/
\_xwiki-platform-rest-restlet-server/
\_xwiki-platform-rest-restlet-representations/
\_xwiki-platform-rest-resources/
This would ease alternative implementations based on other JAX-RS
implementations (CFX, Jersey, etc.)
Jerome
Show replies by date