views:

1655

answers:

4

I'm currently looking into options for creating a client API for a RESTfull application. Up until now we have had WCF services to allow all application to connect to the Business Layer and we're growing dissatisfied with it.

We already have most of the infrastructure in place for the web (html and json requests) but we need to access the services from other applications (some will be linked against the main web app models library, others won't be).

I've been reading about WADL here and here and it seems like it would be beneficial. We could generate the wadl, the client libraries and use it to check javascript urls.

I would like to know what others have used, what worked and what didn't.

+1  A: 

In the REST architecture:

  • The resources link to their description documents, if they have one, not the other way around.
  • The resources are not complex (not RPC like), thus there is usually no need for a description document.
  • Loose Coupling is king; contracts are both unnecessary and harmful.
  • Resources link to each others, removing most of the need for resource discovery services.
Resources in REST can be complex. You need to document your media types in your API.
Wahnfrieden
No, you actually do not need to document anything. The only documentation you need is the specification of the media types (for example see AtomPub, RFC5023; no service documentation required to develop AtomPub clients). Iannick is pretty much on track.
Jan Algermissen
+2  A: 

A good rest client API is a set of wrappers around curl, wget, or your language specific HTTP libraries. You might need some extra methods or functions to deal with the specifics of your application as well (i.e. specialized XML/JSON parsing), but that should be about it.

Jonathan Arkell
why the downvotes?
Jonathan Arkell
A: 

iBeans is a new open source project that is attempting to provide a solution to this. iBeans (Integration Beans) are client APIs for RESTful or other services. Currently iBeans does require a server (you can drop the framework into Tomcat quite easily) and can be used from Javascript or java applications.

Ken
This looks very much like server-side? Or am I missing something?
Jan Algermissen
A: 

Try this web app: FRAPI. It's quite impressive

Aaron Mc Adam
The overall idea looks interesting, however, FRAPI builds on RPC-style thinking, not REST.
Jan Algermissen
uh, but it does REST and uses status codes. but fine
Aaron Mc Adam
Aaron, sorry, but the moment it focusses on 'actions' or provides specific meaning for HTTP error codes or encourages the description of services (where it should encourage description of media types) it ceases to 'do REST'.Jan
Jan Algermissen