CQRS
CQRS is a popular pattern employed to allow developers to better organize application logic. It is an improvement to the originally drafted pattern called Command Query Separation (CQS), which sought to give developers a clean way to separate logic that augments data in the database (commands) from the logic that retrieves data (query).
By introducing this level of separation, we can introduce additional abstractions and adhere to our SOLID principles more easily. Here, we introduce the concept of handlers, which represent individual units of work to be done. These handlers are implemented to specifically complete an operation using the minimum needed and fewest number of dependencies. This allows the code to become more scalable and easier to maintain.
One downside to introducing this level of separation and abstraction is a major increase in the number of files and folders. To fully implement CQRS based on the recommended approach, we might also have several databases...