Constructing Virtual Resource

This example constructs a virtual (user) resource resource. Navigate to this resource from the home via the ‘me’ link relation.

virtual user resource

Goal

  • Ensure resource cachability through using virtual resources (in this case root must be publicly cachable)
  • Return a user redirect resource

Anatomy of code

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

The code

RepresentationFactory

UriFactory

Controller

Factories

Next Chapter

Constructing Searchable Resources

Learn the code mechanics of a search forms on a collection

Go to next chapter