Announcement Announcement Module
Collapse
No announcement yet.
Spring IoC and DI Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Spring IoC and DI

    Hi,
    I am new to Spring Framework and started learning it now.
    Can anyone please explain me briefly, what is Inversion of Control and Dependency Injection.

    Any help is highly appreciated.
    Thanks in advance
    Kristein

  • #2
    Hi,

    I remember spending a week to understand Dependency Injection[DI] and Inversion of Control[IoC] when I started learning Spring framework. I went through the article by Martin Fowler and sunk into heavy depression!!! Luckily I came across this article Dependency Injection Demystified by James Shore. URL is given below:

    http://www.jamesshore.com/Blog/Depen...mystified.html

    Kindly read this article and you'll certainly find yourself to be silly to call this whole concept with a big pompous name like "Dependency Injection".

    Technically speaking, DI specifically refers to an implementation of a particular form of IOC. But in the real world, both seem to mean the same thing.

    Comment


    • #3
      IMHO, the Martin Fowler article is great. I would give that a read.
      http://www.springframework.org/docs/...roduction.html

      Comment


      • #4
        Thanks joejakes for providing me with a good link.But I am still confused with
        IoC.

        Thanks and regards.
        Kristein

        Comment


        • #5
          Originally posted by kristein View Post
          Thanks joejakes for providing me with a good link.But I am still confused with IoC.
          What are you confused about? Have you read the Martin Fowler article. If your confused about what the actual difference is.
          In early 2004, Martin Fowler asked the readers of his site: when talking about Inversion of Control: “the question is, what aspect of control are [they] inverting?”. Fowler then suggested renaming the principle (or at least giving it a more self-explanatory name), and started to use the term Dependency Injection. His article then continued to explain the ideas underpinning the Inversion of Control (IoC) and Dependency Injection (DI) principle.

          Comment


          • #6
            Originally posted by karldmoore View Post
            IMHO, the Martin Fowler article is great. I would give that a read.
            http://www.springframework.org/docs/...roduction.html
            I totally agree that the article by Martin Fowler is great. But I personally feel it as not a good introduction to DI as I find it very elaborate and verbose. There are thousands of articles which go on at length to explain the concept of DI. But saying the same story in a few sentences is pure magic as "Simplicity is Hard".

            Comment

            Working...
            X