What is the difference between an API and SOA
Solution 1
Service Oriented Architecture is an architectural methodology. It is a way of specifying separation of responsibility from a business oriented point of view into independent services, which communicate by a common API (often but not necessarily by publishing events to a bus).
As an example, you could have one service responsible for capturing customer orders, which publishes an OrderCaptured event to the bus; and a separate service responsible for tracking when the customer is billed and how much is owed, which subscribes to the Bus and responds to the OrderCaptured event. The first service might not need to know anything about billing due to the separation of responsibility. And the two services don't need to know about each other either, only about the events going on around them.
An API is an interface that a component/service exposes so that other components can communicate with it. In the example above the Bus is providing a common API for a number of services to communicate.
In summary:
API = any way of communicating exposed by a software component.
SOA = a set of enterprise architectural design principles to solve scalability issues by splitting responsibility into services.
Solution 2
In other Words:
SOA is the Architecture pattern.
An API is one of the ways to enact or to enable the SOA pattern.
SOA is the "Planning" {Blue Print} design method.
API is the actual implementation of the design.
Solution 3
The Concise and Brief version:
API is a layer for providing data access, via http, web sockets, and more, and are more mobile friendly. These API's should be architected with SOA support in mind, and currently use modern technologies evolving around JSON and REST.
SOA is more A2A and B2B Business solutions layer where when business need to pass data back and forth between different types of medium, API's are built, and business rules are built around that. Technologies are normally XML, RPC, and SOAP.
Both use interchangeable technologies. Security can be addressed on both, SOA normally so, API's less so if its purpose is to serve open data.
Niklas
System Developer / Consultant http://www.linkedin.com/pub/niklas-kihl/47/891/856
Updated on August 01, 2022Comments
-
Niklas over 1 year
There are a lot of
What is the difference between...
questions out there but I couldn't find this one.Wikipedia says this about an API
An application programming interface (API) is a source code-based specification intended to be used as an interface by software components to communicate with each other.
And this about SOA
SOA also generally provides a way for consumers of services, such as web-based applications, to be aware of available SOA-based services.
Aren't both technologies where you present services to other services?
Could someone expand on this? -
Niklas about 12 yearsSo an API is a part of a SOA and not the other way around?
-
perfectionist about 12 yearsYes, every architecture (except trivially small ones) will have one or more APIs so that its components can communicate. And SOA is a type of architecture pattern / design.
-
Niklas about 12 yearsThank you, this helped me writing an explanation on a SOA here: stackoverflow.com/questions/2026523/…
-
yathirigan over 8 years>>one of the ways to enact or to enable the SOA pattern<< what could be the other ways ?