...
Please note, due to a bug in RESTlet, it requires HTTP PUT request must have a body. You can add space, or anything to the body
to workaround it.
Service design
- Identify resouces and design the resource structure
- Determine which operations (GET, PUT, POST, DELETE) will be available for which resources
- Map resources into URI structure
- Determine representation for each resource (specific format XML/JSON)
Service implementation
- Implement resources
- Each resource is an instance of restlet Resource class. Every RESTful function is mapped into one or more Resource methods. For example GET method is implemented by Resource.represent
- Resource instances are managed by Spring. You can inject any context or manager that is necessary to perform service operations. For example phonebook service delegates bulk of the work to PhonebookManager.
...