Dependency injection in java
Inversion of Control
JSR 330
JSR-000330
Dependency Injection - Java - Spring
Dependency Injection or (Inversion of Control)
1.1 Dependency
When we say about Dependency Injection , first we need to understand what is dependency?
Dependency, Its when one class is dependent on other....Very high level explanation ha ??
Let me explain you in a very simple way, with the following girl(Y) and boy(B) example.
As two friends are dependent on each other with the relation( Friendship ). Like wise, here if the girl(Y) initiates an object of boy(B) then we say that, Y is dependent on B.
In that case we can't execute the class Y alone.(Because of Dependency).
Advantages of not having Dependency |
---|
|
How Dependency Could be removed ?
----------------------------------------------------------------------------------------------------------
Sorry,
Under Maintenance
No comments