News for hackers. Stuff that matters.
Re:Starting with microservices by BatteryMountain on Thursday January 20, 2022 @02:17AM (#30005773)
At that point it becomes useful to look at some indirection/decoupling patterns like the Mediator pattern.

Then instead of having a IService with 15 methods with a construction with 20 dependencies listed (multiply it with say 50 IServices in your project - mmmm spagheti project), you end up with a IHandler with a single method and a constructor that only has say 3 injected dependencies, only what it needs. The trade off is, you now have 100's of small Handler files, some people don't like that BUT you now have a pleasant git commit history per file and most of the code of a Handler file fits on one screen and it is easy to digest. You can also let a handler trigger other handlers if it needs to (via the same mediator). It also fits with SRP.

Auto-wiring 95% of your dependencies still stays intact as the above plumbing will need it to work.

Re:Starting with microservices by ceesharp on Thursday January 20, 2022 @04:10AM (#30006571)
If your IService has 15 methods and your ctor has 20 dependencies injected, then you have other issues. :)