locked
C# What is advantage of decoupling things RRS feed

  • Question

  • User264732274 posted

    when we develop a project then we create one project for UI, one separate project for business layer and one for DAL etc but we can create all classes in same project. so i like to know the reason why people create separate project in same solution for decoupling things ?

    please tell me the reason and advantage with sample example or code. thanks

    Thursday, September 22, 2016 8:55 AM

Answers

All replies

  • User-782232518 posted

    Save some pennies and read great books from guys such as Martin Fowler. Patterns such as IoC and design approaches such as micro-services all try to emphasize on that. 

    It all starts from pioneering materials such as 

    http://www.martinfowler.com/ieeeSoftware/coupling.pdf 

    Friday, September 23, 2016 3:26 AM
  • User-707554951 posted

    Hi sudip_inn
    It will save you a lot of time for any project that isn't trivially small, where I define trivially small as less than a couple thousand lines of code (depending on the language).
    The reason is that once you get past super small projects, each change or update gets harder the more tightly coupled it is. Being loosely coupled enables you to keep moving forward, adding features, fixing bugs, etc.
    Hope this can help you. If you have any question and confusion about the problem. Please don't hesitate to let me know.
    Best regards
    Cathy

    Friday, September 23, 2016 8:27 AM
  • User264732274 posted

    @Cathy Sorry not very clear. would discuss it in more details with example. thanks

    Friday, September 23, 2016 9:15 AM
  • User-707554951 posted

    Hi sudip_inn,
    I think you problem could be concluded that what is advantage of using three-tier architecture, please refer to the links below:
    http://www.codeproject.com/Articles/36847/Three-Layer-Architecture-in-C-NET
    http://asp-net-by-parijat.blogspot.sg/2014/12/advantages-and-disadvantages-of-using-3.html
    Hope this can help you. If you have any question and confusion about the problem. Please don't hesitate to let me know.
    Best regards
    Cathy

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, September 30, 2016 2:43 AM