On Mar 5, 2008, at 9:59 AM, Fabio Mancinelli wrote:
On 4 mars 08, at 16:23, Sergiu Dumitriu wrote:
There is a long debate about REST vs. SOAP (the comparison here is a bit wrong since REST is not a protocol), anyway REST and WS à la SOAP are two ways of doing WebServices that exploit rather opposite paradigms. So definitely I would say that we DO NOT want to do SOAP! :)
No, I would say that we'd rather have REST at this point as it has more direct benefits than SOAP, since REST does not need special tools to be used by simple users, while SOAP is mostly for machines.
But I think that this project should not be done this way. It will mean that we'll have the application login in 4 places (struts, xmlrpc, gwt, reast). I'd rather we created a distinct application logic layer which can be used by all these communication interfaces (this is what they are, communication interfaces, and they should not contain logic). If we do this, then adding a SOAP protocol would be as simple as creating the listeners and the bridge to the application logic (2 weeks of work at most?). And it will be a little easier to update all the protocols at once.
Not sure of understanding what you say here. The XMLRPC login already uses, for example, the xwiki.getAuthService().authenticate method. Isn't this already the application logic layer you are talking about? Why do you need another?
What I'd like to see is a common description of APIs in a language neutral format (like XML) and then have generators (build time or runtime) that generate the bridge layer for the different technology (REST, XMLRPC, SOAP, etc). This is what Modello does: http://modello.codehaus.org/ Here's for example Maven's data model in XML: http://svn.apache.org/viewvc/maven/components/trunk/maven-model/src/main/mdo... I've found some old email I sent on this list. Here's an extract: " * I think it would be a good idea to have our model defined independently of the language (for example in XML - Here's for example the Maven model defined in xml: http://svn.apache.org/repos/asf/maven/components/trunk/maven-model/src/main/... The reason is that this will allow us to generate lots of things from this model: - Java bindings - XSD - Documentation - Any other language bindings - etc We could use Modello for doing this. It's well integrated into Maven2 and is easy to use. " This allows having a single API definition and then generate bindings for anything and everything. Easier maintenance, consistency, etc. Thanks -Vincent
In the REST approach we would call this very same method in order to authenticate a request on a URI that is "protected", for example a PUT on a http://site/space/page.
But maybe I have misunderstood something.
Anyway, what is done in the "backend" doesn't prevent the fact that you must expose a URI space for addressing xwiki resources. This URI space engineering is the first step and doesn't involve implementation details [1].
Also, this should be done in the new component-based architecture.
Of course. But I was not talking about implementation details in my previous email.
How's that for a nice SoC project?
Actually I have a problem with another project proposal...
I think there is some overlapping between the WebDAV and RESTful XWiki proposal because the description in http://dev.xwiki.org/xwiki/bin/view/Design/WebDAVService is exactly what I called "resource namespace engineering" in a previous message, and it's an integral part (actually it is the foundation) of the RESTful XWiki proposal.
In fact for the RESTful XWiki we need a "view" of the XWiki system in order to make XWiki elements addressable through URIs that can be referenced by HTTP methods GET, PUT, POST, DELETE and, in case, by WebDAV methods PROPPATCH, PROPFIND, MKCOL, COPY, MOVE, LOCK, UNLOCK. Whenever a method is applicable, of course.
So maybe the WebDAV and RESTful XWiki are actually the *same* proposal.
WDYT?
Cheers, Fabio