Contract-First Development

Make it clear for everyone

delivery-deliver loop position

No. People

2+

Time

2+ hours

Difficulty

moderate

Participants

DevOps Team

This practice is part of: Product Ownership.

What is it?

Contract-First Development is about making your intent clear across team members and external teams. By using a tool like OpenAPI, we can define our programming API clearly at the outset. We also update the “contract” before we implement changes to the code.

Contract-First Development

Why use it?

So that everyone can be productive in parallel AND we can have strong guarantees of the resulting applications working together properly. Instead of UI development being blocked awaiting a working service to code against, UI and Service developers can work in parallel. Also, if you define the contract first when developing or changing API interfaces, you have a clearer “Definition Of Done” and “Acceptance Criteria” for the work.

Further benefits include:

  • Code generation for both clients and servers
  • Automated testing and validation tools
  • Simple mocking of the service under development
  • More relevant and current documentation

More tooling around OpenAPI can be found HERE

Further Information

Improve this practice
View all practices