سؤال

Could anyone please explain the difference between onion architecture and Layered architecture using dependency inversion? They look exaclty the same to me. Any input is greatly appreciated :)

هل كانت مفيدة؟

المحلول

I've always thought of it exactly that way: N-tier architecture meets DI--with a couple of constraints.

The most important thing is that code in inner layers is not coupled to code in outer layers (controlled direction of coupling). I also constrain myself layers can only communicate with the layer immediately beneath them (controlled depth of coupling). To my knowledge, no one else is advocating that particular constraint, and Palermo specifically rejects it.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top