Wed, 2023-09-27 16:00

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?
Aren't both technologies where you present services to other services?
Could someone expand on this?
Thank you
SOA is, as the name "Service-oriented architecture" implies, an architectural paradigm: Offer all IT and business functionality as services and make the services known in a service registry. Use the simple services to compose higher level business services and orchestrate the business services by using them in business processes to accomplish the goal of your business.
An API is exactly what you cited from Wikipedia: A source code-based specification. So an API is written in a programming language and offers function calls a program written in that language can use. It makes sense when following the SOA paradigm to publish APIs to your service layer, e.g. as SOAP or REST services in order to be independent from implementing in certain programming languages. But you could just as well define APIs in Java, just like the Java API is an API to the Java virtual machine.
Having an API does not imply you are following the SOA paradigm at all, but a SOA requires some API to implement it.