Why Contract-First Development (CFD)?
December 15, 2021
Blog > Management, Quality, Team Collaboration | Valentina Cupać
Why Contract-First Development (CFD)? Defining contracts before coding helps us gain a transparent view of the communication between systems.
Key benefits of contract-first development:
- Development teams between the systems can work in parallel because they know the interfaces (this means avoiding blockages)
- QA Automation Engineers can already start preparing automated tests based on the contracts (this fits in well with TDD)
- It helps us to get cleaner designs
A concrete example of Contract-First Development for APIs (API-First Design) – why design the REST API interface before coding it:
- It enables REST API design to be done collaboratively by both backend and frontend developers
- QA Automation Engineer is able to start writing automated tests for the REST API
- Backend developers can implement the REST API whilst frontend developers can be simultaneously implementing based on a mock version of the REST API since the interfaces are known