kingdom-python-server icon indicating copy to clipboard operation
kingdom-python-server copied to clipboard

Improvements on interaction of presentation and service layer

Open ruiconti opened this issue 4 years ago • 0 comments

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.

ruiconti avatar Mar 19 '21 18:03 ruiconti