Tight vs Loose Coupling
Автор: Islom Babaev
Загружено: 2022-10-18
Просмотров: 752
Описание:
Today, I'm sharing the concepts of tight and loose coupling. Tight coupling does not let you reuse code, change it with ease and complicates the overall design. On the other hand, loose coupling is what allows you to reuse your existing class, add or change behavior without changing your component.
Tight coupling defines a source code dependency on a type that lives somewhere else (perhaps a framework/package/project) or it could be on any concrete type (not an abstraction). Thus, having a dependency on a concrete type actually leads to tight coupling. How can we avoid that?
One important thing to mention is Dependency Inversion Principle from SOLID. DIP states that any component/class should depend only on abstractions and not on concrete types. Thus, we can plug-in different implementation whenever required.
Should you have any questions, leave a comment and I will explain more in detail.
Credits to @Essential Developer for helping me learn all of those concepts in detail. If you are curios into learning from the original author, read the book "Dependency Injection, Patterns, Principles and Practices by Steven van Deursen, Mark Seemann".
You can also find me on ↴
LinkedIn ☛ / babaev-islom
Medium ☛ / islom-babaev
Feel free to send your inquiries to ↴
Email ☛ [email protected]
Повторяем попытку...

Доступные форматы для скачивания:
Скачать видео
-
Информация по загрузке: