Why should a web architecture be loosely coupled?

2019-01-31 01:11发布

When I look at ASP.NET MVC projects I everytime see loose coupled architecture.

For what do I need a loose coupling in a web architecture (if I do not make unit tests)?

What are advantages and disadvantages of this?

What is the main reason to decouple layers/classes?

What if I do not want to change my DAL for example? I mean when shall I change my whole DAL?! So I could couple my DAL to the UI. What is bad with this?

13条回答
Deceive 欺骗
2楼-- · 2019-01-31 01:52

It will give you scalability. For example if you have service layer behind you can separate it in several servers. Also you will have less dependencies and modifications will be easier. Also code support will be easier.

Here you can see interesting small article : SOA - Loosely Coupled...What?

Shortly it says :

Loosely coupled systems provide many advantages including support for late or dynamically binding to other components while running, and can mediate the difference in the component's structure, security model, protocols, and semantics, thus abstracting volatility...

查看更多
登录 后发表回答