
The goal is that when that business rule changes developers, only need to change code in a small number - ideally only one - of packages. Perhaps, for instance, two classes implement different aspects of the same business rule. That is because changes that affect multiple services requires coordination across multiple teams, which slows down development.Īnother useful principle from OOD is the Common Closure Principle (CCP), which states that classes that change for the same reason should be in the same package. The application also be decomposed in a way so that most new and changed requirements only affect a single service. It make sense to apply the SRP to service design as well and design services that are cohesive and implement a small set of strongly related functions. The SRP defines a responsibility of a class as a reason to change, and states that a class should only have one reason to change. Instead, they can only be achieved by the careful functional decomposition of the application into services.Ī service must be small enough to be developed by a small team and to be easily tested.Ī useful guideline from object-oriented design (OOD) is the Single Responsibility Principle ( SRP). These benefits are not automatically guaranteed.

The microservice architecture does this in two ways: The goal of the microservice architecture is to accelerate software development by enabling continuous delivery/deployment.

The microservice architecture structures an application as a set of loosely coupled services.

You are developing a large, complex application and want to use the microservice architecture.
