What is tight coupling and how does it relate to SOLID?
Answer
Tight coupling occurs when a class directly depends on the concrete implementation of another class — knowing its internal details and being unable to function without that specific dependency. Example: class OrderService { private db = new MySQLDatabase(); } — OrderService is tightly coupled to MySQLDatabase. Tight coupling violates multiple SOLID principles: it violates DIP (depending on concretion, not abstraction), makes testing harder (can't mock the database), and makes the code fragile (changing the database requires changing OrderService). SOLID principles, especially DIP and ISP, directly combat tight coupling by promoting interfaces and dependency injection as the preferred way to connect components.
Previous
What is the difference between SOLID principles and design patterns?
Next
What is loose coupling and why is it desirable?