Monday, February 18, 2008

JAX-RS (JSR 311)

JAX-RS:
  • Standard API for RESTful Web Services in Java
  • Annotations are applied to POJO's to provide RESTful services
  • Planned for inclusion in Java EE 6
REpresentational State Transfer:
  • global resources are identified by URI's
  • clients & servers communicate using standard communications protocol e.g. HTTP
  • provides lightweight alternative to SOAP by transmitting directly over HTTP (no XML)

Key Concepts:

  • Resource - provide access to an individual resource
  • Representation - the state of a Resource
  • Addressability - each Resource has one address, its URI
  • Connectedness - web apps contain many URI's connected to each other
  • Uniform Interface - the interface is the same for any URI
  • Statelessness - web app does not maintain the state of clients (no HTTP sessions)

JSR 311: JAX-RS: The JavaTM API for RESTful Web Services
Implementing RESTful Web Services in Java

No comments: