You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to clean-code...@googlegroups.com
Given that we have a use case "RedeemVoucher" in a Checkout system. Now the Webshop wants to redeem a voucher too. Would i then put the "RedeemVoucher" interactor code in a Voucher entity which is shared code? Because suddenly, a use case is used in more than one application. I would have a use case implementation in an entity, and that feelds kind of wrong to me because we have interactors for this.
Łukasz Duda
unread,
Oct 30, 2014, 10:28:25 AM10/30/14
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to clean-code...@googlegroups.com
Webshop could use checkout system to redeem voucher. I would ask myself this question: Do I want all applications in enterprise to have the ability to redeem voucher?
Frederik Krautwald
unread,
Oct 31, 2014, 11:27:11 AM10/31/14
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to clean-code...@googlegroups.com
Would i then put the "RedeemVoucher" interactor code in a Voucher entity which is shared code?
Definitely not! An Entity is a domain object, whereas an Interactor is an Application Service. If you find that code should be shared across different applications, factor it out into a shared kernel (e.g., a library).