Let's assume our program has 2 layers: A (user interface) and B (does the actual work).
IF I understand DIP correctly, then:
Without using DI the layer A would depend on concrete implementations provided by layer B. With DIP applied the layer A would define abstract interface which layer B would implement. Then using dependency injection the layer B would pass these implementations to the layer A.
My question is:
Should the program's entry point (main() function) be in layer A, or B?
I'm not sure if my reasoning is correct, but I think that if the main() would be in A layer, then there would be a cycle of dependency. On the other hand main() in the layer B feels somehow counter-intuitive to me.