Definition
After creating the strategy for your API, it’s time to define how the API will behave. We can start defining the API architectural style by following the approach you read about before. To get started, let’s describe the most popular API architectural styles and their advantages and disadvantages.
At the top of the popular API architectural styles is REST. As you learned in Chapter 1, this style is attached to the HTTP protocol and works well on the web in situations where API users want to both read and write information. However, it’s worth noting that most implementations of REST are limited to reading data because using the HTTP GET method is less complex than using other methods that permit data manipulation. Other well-known architectural styles in 2023 include GraphQL and gRPC. Both architectural styles can easily be used on APIs that work across the internet. While GraphQL focuses on the ability to retrieve and manipulate arbitrary data, gRPC...