A software contract is a formalized documentation of an interaction with a software component. It can be an interface (in the object-oriented sense), an API, or a protocol (for example, TCP). Contracts allow diverse unconnected components of a system to work together. Having clear, crisp contracts is a prerequisite to enabling successful distributed software development. Here, distributed means not just in the normal distributed systems sense (software with independent components), but also distributed teams.
All libraries and products implement contracts, explicit or implicit. Contracts may be documented (using formal prose such as RFCs, ideally), or embedded in code (less than ideal unless clearly called out).
Contracts do change. The key task of the architect is to ensure the following:
- Contracts are durable and not reactive, and there is no change amplification...