上QQ阅读APP看书,第一时间看更新
Uniform interface
Uniform interface is a constraint that describes a contract between clients and servers. One of the reasons to create an interface between them is to allow each part to evolve regardless of each other. Once there is a contract aligned with the client and server parts, they can start their works independently because, at the end of the day, the way that they will communicate is firmly based on the interface:
The uniform interface is divided into four main groups, called principles:
- Resource-based
- The manipulation of resources using representations
- Self-descriptive messages
- Hypermedia as the Engine of Application State (HATEOAS)
Let's talk more about them.