CQRS - Read DTO Confusion Model

I read on CQRS and I believe that many of the principles are valuable. However, I have one serious point of view. Many people say that readable model queries are directly displayed to view the dtos model. So far, so good. However, where does the “one table or one sample per view” that I constantly hear come from? Of course, some map screens 1-1 are very easy. But I regularly work with some complex screens that would include multiple selections for things like help data in drop-down lists, widgets, etc.

I could easily see that my views needed several choices, perhaps some of them have a mix or two.

How can you avoid this, besides working with ideal world scenarios, where your views are simple and flat?

+3
source share
4 answers

But I regularly work with some kind of complex screens that selects things like reference data in drop-down lists, widgets, etc.

Select lists, widgets, etc. You can view them each, since the views themselves are nested in another view (perhaps, obviously, if they are already their own particles). If you look like this, each of them can have its own request.

+5
source

: " ? ? , ?"

"1 == 1 ". qstarin, view!= Screen.

+2

, , - , . ( EDA) , , , , , , . , , - " *" " *, ID =" . DTO, . , , , , .

+1
source

You can avoid this by using Denormalization . You must make all of your complex data flat (no joins). Also see First Normal Form (1NF or Minimum Form) .

At CQRS, she used the fastest and easiest side to read. As a result, it can be scaled horizontally.

0
source

Source: https://habr.com/ru/post/1781321/


All Articles