Theme-Logo
  •   .Net
    •   C Sharp(C#)
    •   Web API
    •   Micro Services
    •   ASP.Net
    • ASP.Net MVC
    • .Net Core
  •   Database
    • SQL Server
    • Oracle
    • PostgreSQL
  •   jQuery
    • jQuery Tutorials
    • jQuery Plugins
    • jQuery UI
    • More on jquery
  •   Tutorials
    • Microservices Tutorials
    • DotNet Core Tutorials
    • PostgreSql Tutorials

Differences between tight coupling and loose coupling in C#

Tight coupling means classes and objects are dependent on one another. In general, tight coupling is usually not good because it reduces the flexibility and re-usability of the code while Loose coupling means reducing the dependencies of a class that uses the different class directly.

In general, Tight Coupling is bad in but most of the time, because it reduces flexibility and re-usability of code, it makes changes much more difficult, it impedes test ability etc. Loose coupling is a better choice because a loosely coupled will help you when your application need to change or grow.

Tight coupling

The tightly coupled object is an object that needs to know about other objects and is usually highly dependent on each other's interfaces.

In the small applications, we can easily identify the changes and there is less chance to miss anything. But in large applications, these inter-dependencies are not always known by every programmer and there is a chance of overlooking changes.

Loose coupling

A loosely coupled system is one in which each of its components has, or makes use of, little or no knowledge of the definitions of other separate components. Subareas include the coupling of classes, interfaces, data, and services.

Loose coupling is a much more generic concept intended to increase the flexibility of a system, make it more maintainable, and makes the entire framework more "stable".

Being loosely coupled enables you to keep moving forward, adding features, fixing bugs, etc.

We can make a tight coupling system into loose coupling by injecting their dependecies (here DI introduced). We need a managing class that will produce an instance via an interface.

To know more about Dependency Injection, please click here.

Trending Post
Dependency Injection in C#
Inversion of controls (IoC)
Design patterns
Service-Oriented Architecture(SOA)
Interview Questions and Answers
What is SOLID Principles?
What is Design patterns?
What is tight coupling and loose coupling?
Advantage of design patterns?
What is difference between IoC and DI?
About us

DotNet Palace is a community platform created and maintained by The articles are mainly focused on Microsoft stack technologies like C#, ASP.Net, MVC, .Net Core, SQL Server and Oracle, PostgreSQL, SQLite etc. To improve the site's content you can send your valuable suggestions at info.dotnetpalace@gmail.com

Quick links
  • SOLID Principles
  • Questions
  • OOPS Principles
  • DotNet Palace Tutorials
  • Privacy Policy
  • Terms and Condition