vendredi 10 septembre 2021

dependency injection between business layer and presentation layer

I am trying to follow clean architecture in my software. I have implemented 3 layers DataLayer, BusinessLayer and Presentation Layer.

As far as I understand dependency will follow outside to inside like P->B->D.

But my question is should I do a singleton dataLayer executor injection into presentation?isnt that breaks this logic?

or without DI, only create an abstraction between layers i think creates tight coupling. So refferring some dataLayer dependency from inside businessLayer doesnt make the layers tight coupled?

Aucun commentaire:

Enregistrer un commentaire