Articles
Contract Based Development
Contract-driven development is a software engineering approach where the development process is driven by the design and implementation of contracts between different components or modules in a software system. these contracts define the interfaces between different modules or components and the expectations or requirements that each module has of the other.
In contract-driven development, the design and implementation of contracts between components take priority over the implementation of the components themselves. The goal is to ensure that the components are designed to work together effectively, and that each component has a clear understanding of the requirements and constraints of the other components it interacts with.
the contract typically includes a set of preconditions, postconditions, and invariants that define the behavior of the module or component.
- Preconditions define the assumptions that must be true before a module can be called,
- Postconditions define the guarantees that are true after the module has completed, and
- Invariants define the properties that must be true throughout the execution of the module.
API-Driven Development
Back then
Back then
Traditionally, software development starts with creation of a user interface (UI) and then the back-end logic is built to support that UI. with API-driven development, however, the API is designed and developed first, and the UI is then built to consume those APIs.
Now
Now
API-driven development, also known as API-first development, is a software development approach that prioritizes design and development of APIs as the foundation of a software system.
API-driven development is becoming increasingly popular, especially with the rise of microservices architecture and cloud computing. It enables developers to build flexible, scalable, and reusable applications that can adapt to changing business needs.
references
- "Contract-Driven Development for Web Services" by M. Fischer and G. Lausen. This paper discusses how contract-driven development can be applied to web services and provides some examples.
- "An Overview of Contract-Driven Development" by P. Müller and W. Schäfer. This paper provides an overview of contract-driven development and discusses its benefits and drawbacks.
- "Contract-Driven Development with Eiffel" by B. Meyer. This book discusses how contract-driven development can be implemented using the Eiffel programming language.
- "Design by Contract" by B. Meyer. This book is considered the seminal work on contract-driven development and provides an in-depth explanation of the approach.
- Video