Why should a web architecture be loosely coupled?

后端 未结 13 2028
盖世英雄少女心
盖世英雄少女心 2020-12-23 14:19

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 test

13条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-23 15:04

    The main reason to couple and decouple the classes is for extendability. The Change in one should not affect other.

    if you build an application that is currently using MYSql database to store the data. Now we have new requirement to store the Data in MSSQL as his backend system. What Solution are you left if you build the system more integrated with MYSQL Libraries. To Rewrite the Whole application for MSSQL. Now how about this We build a new DAL based on MSSQL and plug the Dal into the system without making any changes to the system (UI).

    The Application is calling the routine based on interfaces and interfaces are free from implementation.

    Try reading about Unity or MEF these topics will provide you good insight

提交回复
热议问题