Hypermedia as the engine of the application state

This constraint is often known as HATEOAS or hypermedia constraint. In Roy T. Fielding's dissertation, there is no detailed explanation of this constraint. The following definition from Wikipedia provides a good definition:

Having accessed an initial URI for the REST application—analogous to a human web user accessing the home page of a website—a REST client should then be able to use server-provided links dynamically to discover all the available actions and resources it needs. As access proceeds, the server responds with text that includes hyperlinks to other actions that are currently available. There is no need for the client to be hardcoded with information regarding the structure or dynamics of the REST service.

This constraint is also called hypertext-driven, and according to Roy T. Fielding, REST APIs must be hypertext-driven (http://roy.gbiv.com/untangled/2008/rest-apis-must-be-hypertext-driven). Otherwise, an API cannot be RESTful and cannot be called a REST API. This raised lots of debates over whether or not HATEOAS is useful or practical. We will talk about this later in detail.

Those are all of the constraints of REST. As you can see, REST is an architectural style that defines several constraints. It is not a standard of how you should design your API, and it doesn't specify any implementation details. You can use the programming language that you prefer to build RESTful APIs.

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

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