Create a source code template that a developer can copy in order to quickly start developing a new service. A template is a simple runnable service that implements the required build logic and cross cutting concerns along with sample application logic.
Resulting context
This pattern has the following benefits:
a developer can quickly and easily start developing a new microservice.
it ensures that cross-cutting concerns are implemented in a standardized consistent way
it encourages developers to ‘do the right thing’
This pattern has the following drawbacks:
it’s a form of copy/paste programming. When you change the service template due to changing requirements, you must update existing services individually. Creating service repositories by forking the service template repository can minimize the work by leveraging Git. However, there’s a risk that services created at different points in time will diverge.
This pattern has the following issues:
you need a service template for each programming language/framework that you want to use. This can be an obstacle to adopting a new programming language or framework.