Answer the question
In order to leave comments, you need to log in
Where to download intermediate data?
Let's say there is an entity "record", "comments", "user", all these are separate classes.
In the application, let's say the 'post' model will load a collection of 'post' objects with the number of comments.
And all this will be displayed on the page.
But what if you want the entries that the user has already viewed or bookmarked to be marked?
All my decisions lead either to links between two models, or to the removal of logic in the controller.
Answer the question
In order to leave comments, you need to log in
Share not models, but bounded contexts.
Post, comments and user are one bounded context.
This idea is sanctified in Vernon's book - "Implementing Domain-Oriented Design Methods".
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question