Benefits & Variations

In this lesson, we'll look at some benefits of self-contained systems and some variations to the approaches discussed here.

Benefits #

SCSs are a logical extension of the idea of bounded contexts.

A bounded context contains the logic on a specific part of the domain.

SCSs make sure that the UI and the persistence are part of one single microservice so that the split by domain that domain-driven design advocates are further improved by SCS.

Ideally, one feature should lead to one change. In an SCS system, the chance that this actually happens is quite high: the change will likely be in one domain. It can be contained in one SCS even if the UI and the persistence need to change, and the change can be put into production with one deployment. Therefore, SCSs provide better changeability.

Also, testing is easier because all the required code for the domain is in one domain. So, it is easier to do meaningful tests of the logic together with the UI.

Due to the focus on the UI, SCSs make it easier to implement integration in the UI. So, SCSs open up additional integration options. This is particularly useful for heterogeneous UI technology stacks. With the rate of innovation in UI technologies, it is unrealistic to assume a uniform UI technology stack.

Get hands-on with 1400+ tech skills courses.