Service First Design means designing the service straight after drafting the user interface for applications with a mobile or web front-end and a microservices back-end.
The traditional approach to application development is to first draft the user interface, then model the database and formulate the business rules to arrive at the finished application.
The Service First Design approach is to first draft the user interface, then design the service, then model the database and formulate the business rules to arrive at the finished application. The business rules and the data model are driven by the services required.
Also, implementation-wise, we should first create the screens and the services. The services can be provided by a mock server. This way, we can show the user a prototype of the application without creating an expensive back-end logic and database model.
Service First Design has the following advantages:
- Independent Development and Testing
To ensure that both the front-end and server applications work as they should, it’s a great advantage to be able to run them independently. If the web APIs are clearly defined, mock-ups for both the front-end and the server can be created, enabling independent development.
Changes in the front-end specifications can result in changes to the web API. This can be relatively expensive if both the front-end and back-end need updating, as development, testing and deployment will all need to be re-done. Design and implementation of the web APIs first will keep this to a minimum.
- Different Teams
It might be that the front-end is developed by a different team than the back-end. This requires a solid definition of the web API end points before development has started. This way the front-end team can develop independently once the back-end service mock-ups are created.