RESTful Java Training Course

Course Summary

The three day RESTful Java™ Training Course provides a thorough guide to the design and implementation of RESTful web services using Java. We take students from the fundamental concepts of the REST architectural style and its embodiment in existing web standards, all the way through the creation and testing of a REST service. The course also illustrates how the decades-old HTTP protocol can in fact elegantly address a variety of "enterprise scale" issues, including high concurrency and atomic transactions.

 

Duration [top]

3 days.

Objectives [top]

On completion of this course, students will have implemented and tested a "web scale" RESTful web service using the open-source Jersey and Jackson libraries. Students will be able to:

  • Explain the fundamental concepts of the REST architectural style, and how they contrast against other web service architectures such as SOAP
  • Use HTTP's rich vocabulary of verbs and headers, URIs and media types as the basic building blocks of a scalable, future-proof service
  • Recognize and implement common patterns for constructing links, paginating and summarizing collections and providing atomic transactions
  • Transfer and apply the RESTful principles, demonstrated in this course with Jersey and Jackson, to other libraries, frameworks and programming languages

Audience [top]

The Java Web Services course is geared toward software developers with experience in the Java programming language. Familiarity with annotations is helpful. No other background with Java EE frameworks (such as servlets, servlet containers, JPA, etc.) or related technologies (e.g. Spring, OSGi) is required.

Instructors [top]

Photo

Gordon Force has 25 years of product development experience as a developer, architect, director and instructor. Previously, he led development and application support for the ConnectPay and Encompass products at First Data. Agile development, with a heavy emphasis on testing, contributed to an effective strategy for consistently delivering new features on time, with high quality and industry compliance. Gordon now leads NewCircle as CEO.

More about Gordon Force...

Outline [top]

1. Concepts: REST vs. the Rest

  • The Richardson Maturity Model
  • Resources: identification, representations and manipulation
  • Hypermedia as engine of application state

2. HTTP Basics

3. Intro to JAX-RS and Jersey

  • Creating resource classes
  • Jersey annotations: HTTP methods and headers
  • Constructing responses: headers and bodies
  • Standalone deployment with SimpleServerFactory
  • Testing fundamentals: JUnit and Jersey-Client

4. Resource Representations

  • Standard internet media types
  • JAXB: standard annotations and "content negotiation" for XML and JSON
  • Jackson: a non-standard, JSON-optimized alternative
  • More testing: Jackson object mapping and Hamcrest pattern matching

5. Representation Recipes

  • Building links to related resources, and URI templates for families of resources
  • Aggregate representations
  • Combating representation bloat: summaries, expansions and pagination

6. "Enterprise" HTTP

  • Authentication
  • Optimizations: conditional requests (using modification dates and entity tags) and caching
  • Transactions: ephemeral resources
  • When does a GET have to be a POST?