Real REST

From WikiEducator
Jump to: navigation, search


Real ReST
Convenor: Rickard Öberg
Participants:
  • Tasos
  • ...
Summary:

The main gist of this discussions was the problems you get when trying to apply REST by exposing your domain model. It makes it very hard to create links that makes sense, and also creates high coupling between various parts of a REST API.

Recommendations:

The trick is to expose usecases instead of the domain model, in the form of commands and queries (see CQRS for ideas). This allows each part of the REST API to be self-contained, minimizes coupling, and maximizes performance as the server API matches the needs of the client. This also makes it easier to keep all logic related to authorization, application state, and "when to do what" on the server, thus making it easier to create alternative clients that behave the same way.


Audio Recording

Links

Rickard at Javazone 2011: Implementing a REST API using Qi4j