Tip #19 – Design loosely Coupled Service Contracts
Loosely coupled service capabilities help achieve agility in business processes and technology solutions. Why? Because, they make fewer assumptions about the implementation technologies and consumption characteristics. Designing contracts or interfaces is a critical activity when building service capabilities. The interface needs to avoid specifying technology specific, implementation environment specific constructs. This includes operation system variables, vendor-specific variables, database layout/structure etc. The idea is to not tie yourself too closely with a particular implementation. Ask yourself – what is the impact to the service capability if the underlying database is moved to a different vendor? what if we skip the database completely and load data from a file cache? You shouldn’t have to move mountains to accommodate such changes if the interface is not tied to a single implementation. This concept must sound familiar 🙂 Indeed it is the same idea that has been espoused with object oriented design. Separate interface from implementation. A service capability may utilize a legacy provider, packaged application, an externally hosted solution (a cloud maybe). It is essential that the service capability is carefully designed when integrating with these dependencies. If there are attributes internal to a legacy system ensure that they are not specified on the service contract.