What Is a Contract?

In the context of this article, we will consider a contract to be any mechanism that requires a developer to comply with the specifications of an Application Programming Interface (API). Often, an API is referred to as a framework. The online dictionary Dictionary.com (http:www.dictionary.com) defines a contact as “an agreement between two or more parties, especially one that is written and enforceable by law.”

This is exactly what happens when a developer uses an API—with the project manager or business owner representing the law. When using contracts, the developer is required to comply with the rules defined in the framework. This includes issues like method names, number of parameters, and so on. In short, standards are ...

Get Object-Oriented Thought Process, The, Second 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.