Spring 4 REST Design
Things involved in JAX-RS Application
- Create Object models
- Design URIs
- Determine Data formats
- 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
- ...