What problem of Layer Architecture really solve Onion Architecture?

154 Views Asked by At

I have read several articles about onion architecture and they all point to the fact that the problem of layer architecture is that changes in the database would impact the services layer, but, why would that be so if the connection between both layers is made through an interface?. Any explanation will be welcome.

1

There are 1 best solutions below

3
Peter Csala On

The Onion architecture is explicitly embracing the facade pattern.

Whereas the Layered / Tiered architecture does not mandate the usage of this pattern. It "only" imposes a constraint on the communication direction. It should not be bidirectional rather than the upper can access the lower layer.

Please also note that there is a variant of layered architecture where an given layer can access not just the directly below layer but any layer below it.