REST in JEE
Nearly a month afterJSR-311 was announced, I had a chance to read through the proposal, and read others’ comments, particularly on the rest-discuss mailing list.
Most JSR proposals are intentionally vague on what they want to deliver, and JSR-311 is no exception. It is clear that this "JSR will develop an API for providing REST support in the Java Platform".
Looking at Marc Hadley’s blog post on this JSR, we can expect that the API will include some annotations to bind a URI to a class, binding of URIs to methods, some form of data binding, WADL, URI templates and so on. From the JSR proposal and Marc’s examples, it seems that the motivation is to hide HTTP as much as possible, and we know what happened when these kinds of abstractions are tried out in the past (e.g. JAX-RPC). At the first glance, using annotations to map URIs to classes seems like a neat idea, but I find it scary to think of all the URIs scattered in code.
I hope that this JSR will stay close to HTTP without trying to hide it, and not buy into things like WADL.



No comments yet.