Interfaces
For languages that syntactically support interfaces, the published interfaces are usually the best place to start. In addition to typically being documented, they tend to be the least coupled to other modules. They also have a high degree of stability over time, minimizing the effects of whatever coupling cannot be avoided.
In an object-oriented context, you would use the API published via features like Java’s or C#’s interfaces or in C++ class headers. Procedural or functional languages might use function prototypes and signature declarations. Regardless, using the published API specification—even when testing implementations—helps to constrain your usage to the most stable portion of the specification. Even an unpublished, internal-use ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access