Constructing Collections

This example constructs a collection (todo) resource. Navigate to this resource from the user via the ‘todos’ named collection link relation.

collection user todo lists

Goal

  • Return a todo collection in the context of a user resource
  • Practice the code layering of the solution and link relations from the previous tutorial
  • See the usage of a Repository Pattern (store) for retrieving a domain model

Anatomy of code

Below, you see on overview of the code, then you see the implementation.

The code

Domain

Controller

Factories/Helpers

Unlock the next chapter
The role of the UriFactories are
Ensure that URI are never hand constructed
Provide good IDE support
Ensure the code is DRY
All of the above