kingdom-python-server
kingdom-python-server copied to clipboard
Improvements on interaction of presentation and service layer
Issue
As of now, in Authentication aggregate, presentation layer (HTTP) sees right through service layer implementations and is responsible for passing proper dependencies, which is not optimal behavior as it is doing more than one thing. It should focus on presenting.
Although is worth checking #5 for a suggestion on improving error handlings.
Proposed solution
Authentication aggregate does not need to chain events, so we suggest and implementation of an Interactor pattern instead of other modules' MessageBus. It'd be responsible for being the unique entrypoint to service layer. In that sense, it is responsible for injecting dependencies downward.