I'm reading about SOA and the four tenets thats required to make a SOA-application. I have tried different sources, but the explainations is twisting. Im searching for something that is a bit less abstract. Is my interpretation correct?
The four tenets is:
- Services have explicit boundaries
- Services are autonomous
- Services share schema and contract, not class
- Services interoperate based on policy
My interpretation is:
- The methods that a client may use shall be easy to use and well
defined.
- Services shall not be dependent on others. Change of one service
shall not affect another in any way.
- A scheme represent the data that will be sent, contract contains the
defined methods for a service. To make a system loose coupled you
share scheme and contract instead of classes and objects.
- A policy to use a service may be that a particular type of binding
is required so it may be used. Anyone that want to use this service,
must connect to it with this type of binding.
Got answer at programmers.stackexchange.com. Im reposting answer from GlenH7:
You're pretty close with your abstractions, yes.
- Yes. Well encapsulated is another way of looking at this.
- Yes, but... Service can rely on other services for functionality,
especially if that avoids duplication of code. The nuance here is in
the definition of dependent, I guess.
- Yes. Services perform a contract for a scheme. User provides XYZ
data and the Service will provide ABC action per the contract.
- I view services as operating against a business policy. Business
policy shouldn't get to the level of specifying binding. From the
implementing business policy point of view, you can see where some
services would be dependent upon other services in order to fulfill
their contract without duplicating code. At a broader level,
business policy is just a bunch of rules. Rules that hopefully
interoperate nicely with each. But just like human resources,
business rules have a nasty habit of not getting along with each
other as well. Services are the instantiation of those business
rules. From a lower level point of view, if the caller doesn't use
the advertised binding(s) then the caller will (obviously) be unable
to utilize the service. So while your statement is correct, it's a
bit of a tautology which doesn't enhance your understanding as much.