Spring 4 REST Design

Things involved in JAX-RS Application 

  1. Create Object models
  2. Design URIs 
  3. Determine Data formats 
  4. Determine HTTP methods to use

1.Create Object Models

  • Object models, Object relationship 
  • Object model gets created from use cases 
  • UML class diagram represent classes and their relationships
  • Object models typically results in resources 
  • Example Object models 
    • Customer 
    • Order 
    • Line item 
    • Product

Use case scenarios 

  • Retrieve all customers 
  • Create, read, update, delete a customer 
  • Retrieve all orders of a customer
  • Create, read, update, delete an order for a customer 
  • Compute the average price of orders for a customer 
  • ...

 

Download course content