Part 2 - Simple Approach

It is a good strategy to start with a simple design and extend it later based on the software needs. Remember that increasing some quality attributes might have a negative impact on other attributes. Starting with a complex design to improve performance, for example, will reduce the usability of the software by increasing the onboarding time for new engineers.


That being said, we will start by introducing two layers for each domain:

two-layers-arch

Figure 1 - Two layers architecture

As you can see from the previous figure, the business logic lives near the UI and it depends on the data state layer. This is not a valid DDD layering but this is ok to keep our layered architecture simple. In the next part, we will introduce a real DDD layering.
If we consider the dashboard domain from Part 1 example, the domain folder structure will look like this (complete code here):

In addition to the layered DDD, we use additional concepts: