2. 1. Introduction
2. What is & Why REST?
3. Features of RESTEasy
4. Content Negotiation
5. Annotations
6. Demo
Agenda
3. Introduction
● A JBoss project
● Helps build RESTful Java applications
● An implementation of the JAX-RS 2.0 specification
● Portable implementation that can run in any servlet container
● Other JAX-RS implementations: Jersey & Restlet
4. What is REST?
● REpresentational State Transfer
● Conceptualised by Roy Fielding
● Addressable resources
● Uniform, constrained interface
● Representation oriented
● Stateless communication
● Evolved with HTTP 1.1
● Not a protocol, an interface, an API or an replacement for SOAP
5. Why REST?
● Fixed well defined verbs i.e. GET, POST, DELETE etc
● Focus on resources not services
● Different REST endpoints “feel consistent”
● Follows architectural style
● Scalable
● Easily readable & understandable.
6. Features of RESTEasy
● Portable to Tomcat and many other app-server
● Rich set of providers for: XML, JSON, YAML, Fastinfoset, Multipart, XOP,
Atom, etc.
● GZIP content-encoding
● Rich interceptor model.
● EJB, Seam, Guice, Spring, and Spring MVC integration
● Lightweight
● Security