In previous chapters, we’ve seen how to build well-formed web services. Services represent the basic building blocks of a service-oriented architecture. But by definition, a well-made service must be loosely coupled from other services. It must, in general, leave routing logic up to an external component such as an enterprise service bus. The real promise of SOA is not realized by building services alone, but by defining clear services with high cohesion, that wholly describe their interactions and that are then capable of being reused, through composition, in a variety of process-based services.
The key design principles of SOA include:
Loose coupling, which means that a change to one component results in minimal or no change to other related components.
Interoperability, which builds on the idea of loose coupling to suggest that services should be able to exchange messages with other services, even if they are implemented in different languages and their platforms differ dramatically.
Reusability, which means that more than one application can act as a client of your service without resorting to internal service changes. Services must be autonomous, or capable of running independently, and be designed in logical divisions that fully encapsulate their business logic.
Discoverability, which means that a service’s execution environment and contract allow it to be looked up, bound to, and invoked at runtime.
These goals are interrelated, ...