JavaOne 2006 has finally seen its first presentations about REST. Dave Johnson, from Sun, has demonstrated the beauty of REST with this presentation of the Atom Publication Protocol, one of the finest REST example available. This is great! Marc Hadley, also from Sun, then demonstrated how JAX-WS 2.0 can now support the REST architecture style. He is also promoting a nice language to describe RESTful Web applications (WADL). On one hand the support for REST within Java EE is good news because it means that Sun is finally paying attention to this alternative to SOAP-based Web Services. On the other hand, many people have concerns about the complexity of this approach that tries to bend WS-* and REST into a common set of APIs and tools.
Dion Hinchcliffe just wrote a great summary of the situation in this article. He points to some harsh comments from Richard Monson-Haefel, the famous author of books on EJB and Java Web services and original author of the OpenEJB container:
- JAX-RPC is Bad, Bad, Bad!
- JAX-WS is Bad, Bad, Bad!
- Eating My Own Words
- Redeemed! JAX-WS still sucks!
Now, if you’ve been following this blog, you know that I’m developing a pure REST framework (Restlet) that aims to be a much simpler alternative to not only JAX-WS, but to the various technologies related to Web Oriented Architecture in the Java EE stack including Servlet API, JSP, JAX-WS, HttpURLConnection, JavaMail, etc. With Restlets, you also don’t have to use two different APIs to write client or server code as one uniform API is used for all situations and all protocols (HTTP, SMTP, JDBC, etc.).
Another advantage is that you need zero XML configuration to get the most complex applications running. Check this tutorial part for a usage examples: http://www.restlet.org/tutorial
Update: In a recent Burton Group report, Richard Monson-Haefel sees “JEE5 as the beginning of the end of Java EE”. In points out the complexity of JEE and its lack of adaptability to the SOA trend. Personally, I don’t share the same pessimism, but I do think that JEE needs to continue on the path of simplification and open itself to lightweight REST Web Services.