Skip to main content

Posts

Showing posts from May, 2021

Separate frontend 1: Trying to separate GUI layer and data business layer.

I have seen in some projects where I have been part of. The dependency injection is done in the presentation part of the application. That can be the API front or the GUI part like in a ASP.Net web application. The way this is done is to have some interfaces to separate the business from the data layers. Often by having the interfaces for them self in a separate project. Then the presentation layer references the business layer, interfaces and data layer, and connects it all together using dependency injection. This makes it easier to test, and change storage or parts of the application. As the injector can just inject new implementations of the interfaces.  But to me that feels like the presentation layer has two large responsibilities,  to present data and connect all the different parts together. What if you needed to change the presentation.  Then you would have to implement the injections also. You can't just switch out the presentation or add new ones. What if the o...