Last Wishes is a PHP application written following Domain-Driven Design approach. It's one of the sample applications where you can check the concepts explained in the "Domain-Driven Design in PHP" book.
Hi, Thanks for your awesome book! I have a question:
On page 306 your say:
Using a dedicated class per Application Service makes the code more robust against external changes (Single Responsibility Principle). There are fewer reasons to change the class, as the Service does one and only one thing. The Application Service will be easier to test, seeing as it does less things. It’s easier to implement a common Application Service contract, making class decoration easier (check out the chapter on transactions in Repositories). This will also result in higher cohesion, as all dependencies are exclusively dedicated to a single use case.
The execution method could have a more expressive name, like signUp. However, the execute Command pattern186 format standardizes a common contract across Application Services, thereby enabling easy decoration, which comes in handy for transactions.
How would you handle viewing " one wish" vs e.g. "All whishes"? Would this be:
Two separate classes for the two use cases
One class; Two methods
One class; logic handled in the execute method based on parameter / request obj
Hi, Thanks for your awesome book! I have a question:
On page 306 your say:
How would you handle viewing " one wish" vs e.g. "All whishes"? Would this be:
Thanks.