Thursday, December 27, 2018

Main Theme of CQRS

CQRS main theme is against the Layers. 

Layers forces use to think applications in such a way that our Classes become BBOM and handling many concerns a one time. Read and Write.

Re usability of Classes/Data holding Data Structure/methods force us to have Classes those are BBOM and handling too many concerns at one time. Making Classes reusable and convert all the scenarios

Table/View oriented classes make them BBOM because we are forced to put all logic related to a table inside the Table Class. Results in a Table Class that is BBOM. 

These Layers, Resuability, DB Schema oriented Classes forces us to have BBOM Classes. This thing hides the Vertical Slices in the Application.

Instead, CQRS forces us to think Application as vertical slices

Things are much more Vertical Abstraction Oriented. or View or feature orinted.

We design applications by Vertical Features and We do not try to reuse Classes, Views, ViewModel, Controllers, RequestModel, ResponseModel, Command AS, Queries AS, Repositories, Factories, Domain Events, Domain Services and all Data Structures in View, AS and Data Layer. are specific to a feature. All these Classes are encapsulated inside the Folders for the Feature and they are specific to that Feature. Only Entities and VO and Domain Events seems outside this Vertical Slices. In the Domain Model things are generic and shared across the Vertical Slices.

In

No comments:

Post a Comment