billseipel,

Educate me:

If you are already using MVC then why use the Mediator pattern?

Both use 'routing'....

khalidabuhakmeh,
@khalidabuhakmeh@mastodon.social avatar

@billseipel I don't. I generally think in-memory mediators are unnecessary allocation and deck-chair shuffling.

If we're talking about distributed messaging, that's another story.

I also think the "it makes testing easier" crowd is wrong on this topic.

distantcam,

@billseipel For testing it can be easier/nicer having a single handler to test rather than a whole controller.

distantcam,

@billseipel I just thought of another reason. It makes everything look the same. Controllers call mediator handlers. Azure functions call mediator handlers and tests call mediator handlers. The pattern is easy to pick up on for new devs. Same code.

billseipel,

@distantcam So.. controllers control applucation traffic to ...mediators and mediators handle business logic traffic?

TimPurdum,

@billseipel @distantcam sound like minimal API...

distantcam,

@TimPurdum @billseipel azure functions has a minimal api?

  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • DreamBathrooms
  • mdbf
  • ngwrru68w68
  • magazineikmin
  • thenastyranch
  • rosin
  • khanakhh
  • osvaldo12
  • Youngstown
  • slotface
  • Durango
  • kavyap
  • InstantRegret
  • tacticalgear
  • anitta
  • ethstaker
  • modclub
  • cisconetworking
  • tester
  • GTA5RPClips
  • cubers
  • everett
  • megavids
  • provamag3
  • normalnudes
  • Leos
  • JUstTest
  • lostlight
  • All magazines