What is SOA and what are the advantages of its use?

I have read some definitions on the web, but none have managed to reach a level that allows me to clearly define what it is and what the advantages of SOA within a company are.

Update

Some of the definitions found were:

A) SOA is a style of software architecture whose principle fundamental preaches that the functionalities implemented by applications must be made available in the form of serviços;

B) corresponds to a methodology for software development , serviços, represents all of the company's software assets;

C) is a project style that guides all aspects of creation and use serviços of business through the entire life cycle of development.

There is a strong tendency to believe, given the definitions, that sound is intrinsically linked to the provision of services, its main focus being to offer services.

SOA is a style, a methodology, a process, an approach? How to define without being impartial to the point of leaving doubts about the concept?

 2
soa
Author: Geison Santos, 2014-05-30

1 answers

I think two real-world examples can make you understand a little better why this is relevant. Alias, to tell the truth, when I read your question I was interested and went to research and saw that I have been working with it for some time and had not even noticed. As I had never really heard of SOA I wrote this answer more to try to help with some things that I have noticed in my work and that I think are related. I ask those who really know the subject that correct me in case I talk some bullshit there. Come on:

1. Single page applications (spa's)

Nowadays there are several single page applications out there. The classic example is gmail. These applications are marked by the fact that they have an interface created for the web that is extremely interactive and that does not have to reload the page, that is, it loads most of the application in the first run and the subsequent runs serve to receive necessary resources in certain moments.

I will not discuss the advantages and disadvantages of Spa's, but basically to make a quality SPA you implement two totally separate things: a graphical interface written with HTML/CSS / Javascript and a web service. The web service consistently exposes all the methods to perform the manipulations on the domain that your application needs.

2. WPF applications using MVVM

When you develop an application for windows desktop using WPF is common you want to approach this with the MVVM standard. A common way to encapsulate data access logic in these applications is to use a service. When I worked with it I remember that I saw some tutorials and books and were used at the time of WCF services. The reasons are pretty much the same as the SPA's.

Advantages

With this kind of approach you get a few things

  1. Separation of concepts well done: the interface knows the interface, the server knows the domain. Interface changes do not affect the domain, and domain changes usually do not require major interface changes.

  2. The same service can be used for various interfaces. If you need to use the same data on a second interface (on a website, for example, or on a mobile application), you can order the same service. Again, changing something on the server does not require changing multiple places.

So besides you have like share functionality in several different environments (they just know how to communicate via HTTP in the case of web services), you can allow the responsibilities of different components that make up your system to be well defined, so that you can have ease of maintenance.

Assuming that you develop your service with object orientation and that you can actually build it with low coupling and high cohesion using the principles of object orientation objects and everything. If you need to change the data access logic, it will change in one place, on the server and all client applications without any kind of change in your code will benefit from it.

If you change the way a domain type is implemented, the same thing happens. In general, you can reuse a lot of code, allow much greater portability and have a lot of flexibility when creating your graphical interface.

In the case of services web, imagine that api.meuservidor.com/clientes/ is a URL that points to a resource capable of returning a list of clients. When building the interface this is all you need to know to render a list of clients. How customers are implemented, how they are stored, or etc, it is not necessary to know. If you work in a team and there is a programmer responsible for the graphical interface, this will greatly facilitate his life.

In short, implement the real features of your application dealing with domain types and etc in a service layer allows you to reduce coupling, increase code reuse and make it easier to maintain your application. In this way, SOA is a methodology, as you said yourself, a style of architecture, which instructs you to have in your software a layer of services to be able to have all these advantages among others.

References

Service-Oriented Architecture-Wikipedia PT

Service-Oriented Architecture (SOA) Definition

 1
Author: SomeDeveloper, 2014-06-02 02:12:08