What Is a Contract?
In the context of this chapter, we will consider a contract to be any mechanism that requires a developer to comply with the specifications of an API. Often, an API is referred to as a framework. The online dictionary, Dictionary.com (http://www.dictionary.com), defines a contract as “an agreement between two or more parties for the doing or not doing of something specified” and “an agreement enforceable by law.”
This is exactly what happens when a developer uses an API—with the project manager, business owner, or industry standard providing the enforcement. When using contracts, the developer is required to comply with the rules defined in the framework. This includes issues such as method names, number of parameters, and ...
Get The Object-Oriented Thought Process, Fourth Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.