CR Linefeed

Tuesday, April 12, 2005

Where are the RESTful frameworks for Java?

I've been doing some research into RESTful web services recently. We may be going down this route, so I've been tasked with giving a presentation to the development team on the topic. As part of this, I checked out what Java frameworks are available to simplify the process. The answer seems to be - not many. I've found Gomba and sqlREST which both turn data exposed via JDBC into RESTful web services. But that's it.

I'd expect that there'd be something along the lines of Hibernate that would allow you to declare resources, their URIs and how the different operations (GET, POST etc) map to method calls in Java.

Maybe I'm not looking hard enough, or I've overlooked some reason why such a framework isn't worth writing?

(Btw, the links I've collected during my research are available here:


  • You're trying to fit a square peg into a round hole. REST isn't about RPC. It isn't designed to be turned into method calls.

    By Anonymous Anonymous, at 1:15 pm  

  • I think you misunderstood what I meant, or perhaps I wasn't clear. I didn't mean that I'd take an API and convert it to REST. What I meant was that I'd be able to take a bunch of classes, map those to some URIs and tell it how to "GET", "POST", "DELETE" etc each one. So I'd tell it that my Invoice class maps to /rest/invoice/x where x is the invoice number and that to GET one you need to call MyMiddlewareObject.GetInvoice(x). The returned object would then by automagically converted to XML, with any references to other objects changed into URIs. Does that make more sense?

    By Blogger Chris, at 1:40 pm  

Post a Comment

<< Home