happycoder97
Joined 7 years ago
Karma
31
Submissions
5
Member since
Sep 18
Joined 7 years ago
So, I think, instead of layering, for example I should put everything that needs an access to a User entity's internal fields in User class itself.
For example: User.getProfileAsJson() // for sending out to frontend
Now I am confused regarding where to put methods that involves two entities. Suppose there is an Event entity which represents some online event that can be registered by the User.
Where is the best place to put getEventsRegisteredByUser()?