Inversion of control

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jayagowri
    New Member
    • Mar 2008
    • 1

    Inversion of control

    Can anyone explain me the concept of inversion of control in spring pls
  • JosAH
    Recognized Expert MVP
    • Mar 2007
    • 11453

    #2
    Originally posted by jayagowri
    Can anyone explain me the concept of inversion of control in spring pls
    The Spring manuals explain that in great detail so you're supposed to read it. The
    general idea of IoC or DI (Dependency Injection) is a POJO (Plain Old Java Object)
    that does what it has to do given just interfaces. The IoC mechanism supplies
    implementations of those interfaces and 'injects' them into the POJO; all you
    have to do is define what implementation needs to be injected in a declarative
    manner (outside the actual code), usually using xml files.

    kind regards,

    Jos

    Comment

    • vijay
      New Member
      • Aug 2006
      • 31

      #3
      i have put an aritcle which is
      spring by vijaychoudary in the same site just u can refer to it if u have stil more doubts u can send queries to my personal id

      Comment

      • vijay
        New Member
        • Aug 2006
        • 31

        #4
        hai gowri

        u can be in contact with my personal id
        [ email removed -- mod ]

        if u r facing any problem in Spring framework

        Comment

        • vijay
          New Member
          • Aug 2006
          • 31

          #5
          Originally posted by jayagowri
          Can anyone explain me the concept of inversion of control in spring pls
          In ejbs we have to look up the JNDI to acess the beans

          But in the case of spring
          we have various benas used .....

          1 bean can look up (use) the other bean

          so this look up of bean need be done by the programer by using
          the registry...This is done by the sping container...

          This is caled Inversion Of control

          Comment

          • BigDaddyLH
            Recognized Expert Top Contributor
            • Dec 2007
            • 1216

            #6
            Here is an excellent article titled:

            Inversion of Control Containers and the Dependency Injection pattern

            written by Martin Fowler. I believe he even coined the term "Dependency Injection". Enjoy:

            Explaining the Dependency Injection pattern, by contrasting it with Service Locator. The choice between them is less important than the principle of separating configuration from use.

            Comment

            Working...