What is the difference between an API and SOA

40,144

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.

Share:
40,144
Niklas
Author by

Niklas

System Developer / Consultant http://www.linkedin.com/pub/niklas-kihl/47/891/856

Updated on August 01, 2022

Comments

  • Niklas
    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
    Niklas about 12 years
    So an API is a part of a SOA and not the other way around?
  • perfectionist
    perfectionist about 12 years
    Yes, 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
    Niklas about 12 years
    Thank you, this helped me writing an explanation on a SOA here: stackoverflow.com/questions/2026523/…
  • yathirigan
    yathirigan over 8 years
    >>one of the ways to enact or to enable the SOA pattern<< what could be the other ways ?