4

I'm involved in fully modular monolithic application project. We use MediatR like Jimmy describes in this article: Dealing with Duplication in MediatR Handlers. Exactly this:

I want MediatR to serve as the outermost window into the actual domain-specific behavior in my application

But what with internal communication?

We have some doubts about communication between modules. We use Events and Queries (in monolithic application it is sometimes useful and inevitable). Especially we have problem with queries. If one module must query another then our handlers use IMediator (again) for executing queries from other modules. It looks odd and breaks our approach.

Jimmy mentions Excluding sub-handlers or delegating handlers, where should my logic go? but we do not know what that handlers are.

Maybe we should just use simple interfaces (aka public facade) for this?

It will be cleaner and everything will be clearly defined?

dariol
  • 1,959
  • 17
  • 26

0 Answers0