Slim-Skeleton
Slim-Skeleton copied to clipboard
User actions should be in the Domain namespace instead of the Application namespace
In my opinion these are better suited being in the Domain namespace, as they're implementations are domain-specific. Do you agree?
An action class is a "controller", more precisely a single action controller, which only handles the HTTP request/response-specific tasks. It therefore does not belongs to the Domain namespace.
I saw some articles putting an additionnal layer for API/Controller/Views/etc. whatever that comes from the outside. a "Presentation" layer if I remember.
If anything needs to change, the Action (Controller) should be in Presentation layer and the handler of the action in the Application layer.