Like SPA, Web API plays an important role in service-oriented architecture (SOA). As the name suggests, it is an architecture methodology that deals with separation of responsibility from a business-oriented point of view into independent services. Often, these independent services or components can be designed using RESTful Web APIs.
Consider an e-commerce application that would have different components such as ordering, billing, payment processing, customer profile management, and so on. Each of these components has its own business logic and can be implemented independently.
The following diagram represents a pictorial view of such an application having independent components:
To make them independent, RESTful APIs can be exposed for these components, which can be easily consumed by any client/application including other components as well, as...