Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8424255
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T03:56:19+00:00 2026-06-10T03:56:19+00:00

I have been trying to learn about dependency injection and have been reading about

  • 0

I have been trying to learn about dependency injection and have been reading about and trying to code a small dependency injection container similar to this: http://fabien.potencier.org/article/12/do-you-need-a-dependency-injection-container

The one thing that is confusing me is this:

Isnt a dependency injection container just a glorified implementation of the factory pattern?

If so, why not just call it that, why the need for a fancy term only to confuse matters.

If it isnt, can someone explain what i am missing here?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T03:56:20+00:00Added an answer on June 10, 2026 at 3:56 am

    You have to separate Dependency Injection and Inversion Of Control.

    Dependency Injection is that you inject the dependencies into the class rather than letting the class itself be responsible of its dependencies.

    Inversion Of Control is rather that something takes control over the object and it’s lifetime. In this case it’s up to the container to decide when and how an object should be created and disposed.

    Factory pattern are all about creating a new object at each call. The pattern itself doesn’t say anything about how dependencies should be created.

    That’s why you can configure different lifetimes and use child containers to control objects with limited lifetime.

    I’ve written an article about that here: http://www.codeproject.com/Articles/386164/Get-injected-into-the-world-of-inverted-dependenci

    Or if you like to see with more examples: http://www.codeproject.com/Articles/440665/Having-fun-with-Griffin-Container

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to learn more about the DOM and have been writing some
I am trying to learn assembly my self, and I have been reading different
I am currently trying to learn Android. Have been reading tutorials and manual for
Ok, this may have been answered, but I'm new and trying to learn, so
I have been trying to learn about classes in PHP and part of my
I have been trying to learn about resources and styles, I want to create
I have been trying to learn more about lambda expressions lately, and thought of
I am somewhat new to jQuery but have been having fun trying learn about
I have been trying to learn how to add testing to existing code --
I have been trying to learn a bit more about delegates and lambdas while

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.