As the Java community is increasingly using REST to develop their Web applications, Sun Microsystems is proposing to specify a high-level REST API for Java. If accepted for development by the JCP Executive Comitee, this JSR#311 will formalize as a set of Java 5 annotations to facilitate the exposition of Java objects as REST resources.
These annotations will provide a high-level REST API that will be supported by lower-level APIs.
The JSR expert group will be led by Marc Hadley and Paul Sandoz from Sun. Marc is the author of WADL (Web Application Description Language), a RESTful alternative to WSDL. As the lead of the Restlet project, I was invited to be part of the initial expert group for this JSR. I am looking forward to work with other experts and with anyone interested to see a better support for REST in Java.
There is one related effort named JRA (Java REST Annotations) that I am aware of. That will be one source of inspiration. Personnally, I’m hoping it will promote a deeper mapping to REST, covering the following requirements:
- Doesn”t impose any constraint on resource URIs structure.
- Support dynamic URIs based on the URI Template draft.
- Support all HTTP methods as well as extensions like in WebDAV.
- Support all media types and not just XML.
- Support multiple representations of the same resource.
- Fully embrace the resource-oriented design paradigm.
[Update 1] Another related effort I would like to mention is Sommer, led by Henry Story, which provides a mapping (via annotations) between Java objects and RDF graphs. RDF means Resource Description Framework and is the core specification of the Semantic Web. It formally describes resources (in the REST sense), their URIs and their relationships.
[Update 2] A related thread was started in the REST discussion list.
[Update 3] More links about the announce:
- The Aquarium (Sun)
- Alexis Moussine-Pouchkine (Sun), follow-up
- Henry Story (Sun)
- Dave Johnson (Sun)
- Elliotte Rusty Harold
- Marc Hadley (Sun, spec lead)
- Stefan Tilkov: 1 (InfoQ) and 2 (blog)
- Pete Lacey
- Dan Diephouse (XFire, CFX)
- Brian McCallister (Apache, Ning)
- Frank Sommers (Artima)
- Alex Blewitt (EclipseZone)
- Steve Loughran (NetKernel)
- Tim Bray (Sun)
- Rafael Ferreira (Sun)
- Lars Trieloff
- Paul Sandoz (Sun, spec lead)
- Seth Ladd (Ruby, RoR, Semantic Web)
- Andrew Newman (JRDF, annotations)
- David Megginson (SAX, XML)
- Panic From Fuzzy
- Dejan Bosanac (O’Reilly OnJava)
- Dan Creswell
- Scott Mark
- The Cave
- David Illsley (IBM), follow-up
- Khanderao (Oracle)
[Update 4] Interesting insights from Andrew S. Townley (anterior to JSR announcement)