You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
One thing that can guide u is reason about the "NAME" of that UseCase! This is a good reference to reason about that abstraction purpose.
What u can do to solve this:
remember: an application service should ORCHESTRATE lower-level operations
distribute the business logic between domain services, entities and value objects
think about why u are bearing those dependencies
i would suggest u applying domain events to decouple computations! imagine that we define some usecase named AcceptUserDeal. This usecase would be responsible for persisting user and deal modifications in the database and AT THE END OF THE TRANSACTION u could be publishing a UserDealAccepted domain event!
this domain event would be handled by other usecase, for example, PublishDealDetails and then this one would relate to creating a google+ post or whatever u want to do.
Hi @stemmlerjs !
I was wondering if you have any insight into how best to break up large
use-cases
?I have some constructors which now look like the following:
Is this where the concept of a
service
would come in and we would have a relationship such ascontroller
->use-case
->services[brand, user, ...]
Thanks in advance!
The text was updated successfully, but these errors were encountered: