This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Spring IOC

 
Kunal Lakhani
Ranch Hand
Posts: 622
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Spring IOC helps in decoupling dependencies between components.

What does it mean?

Does it refers to enabling loose coupling?
 
Shashank Ag
Ranch Hand
Posts: 88
Java Spring Tomcat Server
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes it enables loose coupling, as injections are configured in a seperate xml files.
 
Sidharth Pallai
Ranch Hand
Posts: 134
Hibernate Java Netbeans IDE
  • 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Spring do provide IOC through Dependency Injection either with Setter Injection or Constructor Injection, with a aim to avoid TightCoupling and enforce LooseCoupling. In tight coupling, one object is heavily dependent on other object like as below.



Lets try attempt to reduce the impact of tight coupled Travel & Car object


Now Spring did it through XML bean configurations .... as below



spring.xml Configuration :


I can define any vehcile in the xml , ie a Train/Aeroplane/Cruise/Horse/Camel............
 
naveen gupta
Ranch Hand
Posts: 129
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
@Sidharth Pallai..................Good explanation for a beginner

A lot of these new frameworks came into existence because of design flaws in previous frameworks or whatever..............

So when we try to read or learn these new technologies, most of us don't understand the concepts............the constant question that arises for every concept is why we have to do this way.

For every new concept in these frameworks to understand, i think we should know the flaw in the old system/design/framework

Then we can easily or quickly grasp the new concepts/technologies..........

So the best way to learn any new technology is to first understand the fault in the old frameworks/designs
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic