Part 4 Resource relationships

In any API we design, different components need to relate to one another in different ways. In the next few chapters, we’ll examine a variety of ways in which resources can associate and how to design the right API methods to allow users to manage those relationships between resources.

First, in chapter 12, we’ll look at a special type of resource called a singleton sub-resource and how we can rely on this concept to store isolated data with unique access patterns. In chapter 13, we’ll explore how resources can reference one another, as well as how to maintain integrity with these references. In chapters 14 and 15, we’ll look closely at two different ways of managing many-to-many relationships between resources (using association resources or custom add and remove methods). Finally, in chapter 16, we’ll look at polymorphic resources that provide a unique ability for resources to take on multiple roles depending on specific parameters.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.129.13.201