On the 4th of November, I presented a session on REST, Restlet and our port to GWT at the local JUG (Paris Java User Group). More than 200 juggers attended, with a first part on GWT presented by Didier Girard, from onGWT.
Eric Le Merdy, from Valtech, very creatively illustrated the presentation. Here is our first Restlet cartoon!
Thanks to Antonio Goncalves, David Dewalle and Zouheir Cad, the co-founders of Paris JUG for organizing this event. Keep up the fun, the passion and the professionalism!
Here are additional links about the event (all in French):
I would like to encourage you to have a look at frevvo, a Web start-up launched by some friends, that provides a full solution to handle complex Web 2.0 forms, right from your browser. One of their strong selling points is the great form designer available as a Web application (AJAX based).
Also, the form can be directly mapped to an XML Schema that you have imported. Their server component will directly generate valid XML instances when you submit the form to it. Currently it is based on a Servlet container but they are experimenting with Restlet (and already provided key feed-back), so I’m hoping that they will migrate when our final 1.0 version comes out
You can see screenshots and sign up for a live test. Congratulations Ashish, Leandro, Nancy and Yuri, and keep up the great work!!
As reported by Eduardo Pelegri-Llopart, the JSR 311 was approved by the JCP Executive Committee for development. The results of the vote are also available here. Following a request from Apache, the name of the JSR is now “Java API for RESTful Web Services”.
You can check a comprehensive list of posts following the initial announce on my updated blog post. There is a clear interest from the community for such an API. Some voiced concerns about the JCP process, others about the idea of starting with a higher level API before providing a solid lower level API as a foundation. Some don’t want annotations to abstract the supposed complexity of HTTP when others are afraid that the API won’t be simple enough.
In general, people seem to be positive and supportive of the initiative. The expert group now has an important task in its hands. I hope we will be able to work as closely as possible with the rest of the community to gain a constant feed-back and produce a great and widely accepted API!
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)
[Update 5] The JAX-RS extension for Restlet has been added to release 1.1 M3. See the announcement and the documentation about the extension.
InfoQ has done a great interview from Tim Bray (director of Web Technologies at Sun Microsystems, co-inventor of XML). He has a pleasing, enthusiastic and frank tone, which we tend to miss in the Java community. There is also a transcript available. Highly recommended.
In a previous post, I tried to answer to this question: “Will Java EE 5 bring REST to Java”. On one hand I felt happy with the adoption of some REST concepts within Java EE 5 and its first coverage at a JavaOne conference. On the other hand, the current attempt to retrofit REST into the existing JAX-WS stack seems like a dead end to me.
However, I missed an interesting quote from Tim Bray, the director of Web technologies at Sun Microsystems. While asked for prognostications for Java’s short-term future at the end of 2006 Java Technology Roundtable, he replied:
“I would say that by this time next year there will be increasingly widespread perception that the stack of standards around WS-* has largely failed, and anybody who puts significant tooling and resources, significant energy and investment, into tooling and tools around lightweight, REST-flavored Web services is going to look like a major genius.” Reported by FTP Online. Update: see also this interview where Tim Bray explains his views on SOA, POX and REST.
I do hope that this prediction will come true and that Sun will fully embrace this lightweight REST vision within Java EE 6. We are already working toward this goal with our Restlet project, with a first 1.0 release scheduled for 2006Q4. As detailed in our road map document, we will continue pushing for the adoption of REST and its standardization within the Java community. This should become concrete in 2007 by a submission of the Restlet API to the JCP (Java Community Process).
If you also wish that Tim Bray’s prediction comes true for the next Java One, here are some suggestions on how you could help:
- Create a modelling tool to design RESTful applications. Stefan Tilkov has an interesting proposition on Resource-oriented Design and how to visually represent resources and their URIs.
- Write a book on REST and how to design and develop RESTful web services in Java. Dave Johnson, from Sun, has just published a book on RSS and Atom that contains a chapter on the Atom protocol which is an excellent example of RESTful design.
- Contribute to the Restlet project with comments, ideas, bug reports, testing, code contributions, documentation. See the list of open issues.
- Discuss and blog about REST and how it can help you build better and more Web-centric applications in Java. Manohar Viswanathan has just wrote a nice post on “Developing RESTful Web Services in Java”. He’s illustrating it with an example showing the integration of Restlet, Spring and Tomcat.
If you also think that REST deserves a better place in Java, asks to yourself how you can contribute and do it!
Update: In an interview with Paul Krill of InfoWorld, Robert Brewin, co-CTO of software at Sun Microsystems, has confirmed Tim Bray’s vision that lightweight REST Web Services and Web 2.0 in general are getting a higher priority than ever for Sun.
I’ve been wondering for years about the reasons of Java’s failure in the Web browsers. Initially, we thought that it was due to Java performance and that improvements in the JVM (JIT, hostspot), faster processor and larger memories would finally allow Java Applets to live up to their promises.
Unfortunately, we were wrong again. As Java evolved, the JRE became larger and larger. In addition numerous integration issues came up which caused some installation and upgrade nightmares. Of course, Microsoft didn’t help in this area, shipping by default an older and non standard JVM with Windows.
There was a recent poll at Java.net on “What’s wrong with applets?” and the results are no surprise: more than 24% thought that it is “too hard to deploy”. Some comments specifically complain about the JRE size, the slow start-up and the unstable integration with some browsers.
But there’s hope, especially because we are at the start of a new wave of Rich Internet Applications with AJAX, Flash/Flex and XUL being the serious contenders. Microsoft also appear to have some competitive technology in Vista.
Is it definitely lost for Java or do we have a chance to catch up? Well, while discussing this topic with friends at the OSSGTP (Open Source Software Get Together Paris), I did some research and found interesting things:
- Ethan Nicholas, while working at Yahoo! came to similar conclusion and posted an excellent note in his blog. His note received many comments and much attention around the Web: see here and hear there.
- Back in 2001, a request for enhancement was filed in Java’s bug database, asking for a modular JRE. The issue was marked as a duplicate of another issue which unfortunately is invisible to the public.
- The JCP is working on a Java Module JSR (#277) which will provide a much needed upgrade to JAR file, addressing issues such as versioning, dependencies or remote update. Stanley Ho, the JSR spec lead, has more info about this effort, see his slides from JavaOne 2006.
The good news:
- Ethan was recently hired by Sun! Congrats Ethan and good luck in this new endeavour.
- Java 7 (Mustang) will include the new Java Module technology specified by the JSR 277.
It seems that Sun has all the elements for a good solution in its hands. Hopefully, we’ll see a modularized Java Runtime Edition 7.0 with a companion Java Browser Edition 7.0 coming out of Sun’s labs!