Welcome to JavaPolis 2007!
Learn how to build RESTful Web services
Speaker's Qualifications
Agenda
Warning!
RESTful Web services: a pragmatic read
The source: a principled read
The REST style
The REST style applied to the Web architecture
The REST style applied to the Web architecture
The REST style applied to JAX-RS
The REST style applied to JAX-RS
Why is REST prominent now?
Why is REST prominent now?
Why JAX-RS?
Why JAX-RS?
Explain by example
Resource-Oriented Architecture properties
Addressability
Addressability: JAX-RS
Addressability: root resources
Addressability: JAX-RS guiding principles
Uniform interface
Uniform interface
Uniform interface: JAX-RS
Uniform interface: methods on root resources
Uniform interface: JAX-RS guiding principles
Uniform interface: JAX-RS consuming
Uniform interface: consuming
Uniform interface: consuming
Uniform interface: JAX-RS producing
Uniform interface: producing
Uniform interface: annotate on the class
Uniform interface: build a response
Uniform interface: HTTP request and response
Uniform interface: producing
Uniform interface: JAX-RS guiding principles
Statelessness
Statelessness: JAX-RS
Statelessness: per-request life-cycle
Statelessness: constructor can check for errors
Statelessness: JAX-RS guiding principles
Connectedness
Connectedness: JAX-RS
Connectedness: URI building
Connectedness: JAX-RS guiding principles
Resource-Oriented Architecture properties
Lots more to talk about but so little time...
Jersey, the Reference Implementation and more...
Jersey features
Jersey planned features
Jersey experimental feature: Integrate with Scala
Scala example: Mandelbrot service
Status and Schedule
Links
Summary
Concluding statement
This API will enable developers to rapidly build Web applications in Java that are characteristic of the best designed parts of the Web. This JSR will develop an API for providing REST(Representational State Transfer) support in the Java Platform. Lightweight, RESTful approaches are emerging as a popular alternative to SOAP-based technologies for deployment of services on the internet. Currently, building RESTful Web services using the Java Platform is significantly more complex than building SOAP-based services and requires using low-level APIs like Servlets or the dynamic JAX-WS APIs. Correct implementation requires a high level of HTTP knowledge on the developer's part.
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 used 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 REST ful Web Services and also enable low level access in cases where needed by the application.
RESTful Web Services is a relatively new area in the industry and there are still a lot of unknowns in this space. For example, a key aspect of RESTful Web Services is for the service to be stateless. However, this often requires the developer to produce boiler-plate state restoration code that could be avoided with state-aware API help. We expect the expert group to be an active and engaged group of people participating to prioritize and help drive issues to achieve the end goal of a developer friendly API.
Paul Sandoz is the co-spec lead and implementation lead for JSR 311: Java API for RESTful Web Services. Previous to this Paul has participated in the W3C, ISO and ITU-T standards organizations and contributed to the Glassfish Web services stack on performance related technologies and improvements, namely the standardization, implementation, integration and interoperability of Fast Infoset.