Oct 23, 2020

Tight Coupling and Loose Coupling in Spring Framework

Tight coupling

✔️ In general, Tight coupling means the two classes often change together. ✔️ In other words, if A knows more than it should about the way in which B was implemented, then A and B are tightly coupled. Loose coupling : ✔️ In simple words, loose coupling means they are mostly independent. If the only knowledge that class A has about class B, is what class B has exposed through its interface, then class A and class B are said to be loosely coupled. ✔️ In order to over come from the problems of tight coupling between objects, spring framework uses dependency injection mechanism with the help of POJO/POJI model and through dependency injection its possible to achieve loose coupling.

No comments:

Post a Comment

Recent Post

Launching of my new Domain

RaviROza.com