The Artima Developer Community
Sponsored Link

Java Community News
A New JSR: Java API for RESTful Web Services

2 replies on 1 page. Most recent reply: Feb 15, 2007 1:01 AM by Jerome Louvel

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 2 replies on 1 page
Frank Sommers

Posts: 2642
Nickname: fsommers
Registered: Jan, 2002

A New JSR: Java API for RESTful Web Services Posted: Feb 14, 2007 10:40 AM
Reply to this message Reply
Summary
A new JSR was submitted for review to the JCP, promising a standard API to build Java services that conform to the REST invocation style. Headed by Sun, the expert group includes Restlet creator Jerome Louvel, and corporate expert group members include Apache, BEA, Google, JBoss, and TmaxSoft.
Advertisement

The REST style invocation of Web services, popularized by Roy Fielding's work on Web architecture, is becoming an increasing popular alternative to SOAP and other RPC-style Web service invocations. Its proponents claim that REST provides a simpler invocation interface, takes better advantage of the widely-used HTTP protocol, and facilitates more scalable Web service implementations.

Thus far the main ways to build Java Web services that adhere to the REST design principles have been either to create a custom implementation on top of the Servlet API, or to use Jerome Louvel's Restlet framework.

In an interview with Artima, Jerome Louvel on the Restlet Project, Louvel bemoaned the difficulty of using the Servlet API for RESTful services:

As I started the development of a new Web site, I wanted to comply with the REST architectural style... This led me to develop my own REST framework on top of the Servlet API. This worked well up to a point where the Servlet API was completely hidden. [Then] I decided to completely bypass the Servlet API. Fortunately, Jetty has a nice separation between its HTTP protocol implementation and its support for the Servlet API. In the end, I was able to develop the first Restlet connector, an HTTP server connector, directly issuing REST uniform calls.

The Restlet project provides both an API and an implementation based on Louvel's work.

With the recently proposed JSR 311: Java API for RESTful Web Services, RESTful Web services may finally have an official standard API and implementation. According to JSR 311's project's description,

This JSR will aim to provide a high level easy-to use API for developers to write RESTful web services independent of the underlying technology and will allow these services to run on top of the Java EE or the Java SE platforms. The expert group will investigate whether a subset of the API can be made [for use] with Java ME. The goal of this JSR is to provide an easy to use, declarative style of programming using annotations for developers to write RESTful Web Services and also enable low-level access in cases where needed by the application.

Do you agree that building RESTful services in Java is hard? And you see the need for a separate REST-focused Java API?


Bill Venners

Posts: 2284
Nickname: bv
Registered: Jan, 2002

Re: A New JSR: Java API for RESTful Web Services Posted: Feb 14, 2007 2:07 PM
Reply to this message Reply
FYI, Marc Hadley just posted a short blog post about the JSR here:

http://weblogs.java.net/blog/mhadley/archive/2007/02/jsr_311_java_ap.html

Jerome Louvel

Posts: 3
Nickname: jlouvel
Registered: Dec, 2006

Re: A New JSR: Java API for RESTful Web Services Posted: Feb 15, 2007 1:01 AM
Reply to this message Reply
Thanks Franck for discussion the relationship between JSR#311 and the Restlet API. The way I understand the proposed JSR is that it aims at providing a higher-level API for RESTful HTTP web services. I have provided an explanation diagram in this blog post:
http://blog.noelios.com/2007/02/14/new-jsr-to-define-a-high-level-rest-api-for-java/

This would be quite complimentary to the Restlet API which could provide the lower-level API that is mentionned in the JSR and that might become necessary for complete specification of JSR#311. I will discuss this aspect with the Expert Group and will propose to submit the Restlet JSR in parallel if it can help and complement JSR#311.

Flat View: This topic has 2 replies on 1 page
Topic: Develop an Ajax Application with Dojo and DB2 Previous Topic   Next Topic Topic: Martin Fowler on Generating Code with SableCC

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use