Essential RESTful API Patterns

This chapter provides both the concepts and code examples of common and fundamental design patterns of the RESTful API so that you can pick up these examples and replicate and power their RESTful API services.

As design patterns provide generic, time-tested, proven, and reusable solutions to familiar yet recurring design problems, API design patterns are essential for software designers to learn and adapt in their RESTful API applications. API design patterns provide a description or templates to solve specific, recurring API design problems that any software architects and API designers would like to adopt in their API designs. Adopting patterns provides much flexibility to developers and helps them focus on business logic implementation and deliver the service with high quality.

As part of this chapter, we will learn the following common yet essential API design patterns, along with a few sample pieces of code as well. However, please note that there is no specific order to the following patterns and each pattern addresses the RESTful constraints. We also need to ensure that these essential patterns are accounted and ingrained as needed for our API designs and implementation patterns:

  • Statelessness
  • Content negotiation
  • URI templates
  • Design for intent
  • Pagination
  • Discoverability
  • Error and exception logging
  • Unicode
..................Content has been hidden....................

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