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 529417
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T09:05:23+00:00 2026-05-13T09:05:23+00:00

I have decided to use IoC principles on a bigger project. However, i would

  • 0

I have decided to use IoC principles on a bigger project. However, i would like to get something straight that’s been bothering me for a long time. The conclusion that i have come up with is that an IoC container is an architectural pattern, not a design pattern. In other words, no class should be aware of its presence and the container itself should be used at the application layer to stitch up all components. Essentially, it becomes an option, on top of a well designed object-oriented model.
Having said that, how is it possible to access resolved types without sprinkling IoC containers all over the place (regardless of whether they are abstracted or not)? The only option i see here is to utilize abstract factories which use an IoC container to resolve concrete types. This should be easy enough to swap out for a set of standard factories. Is this a good approach? Has anyone on here used it and how well did it work for you? Is there anything else available?

Thanks!

  • 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-05-13T09:05:23+00:00Added an answer on May 13, 2026 at 9:05 am

    As you have already figured out, Dependency Injection (DI) itself is only a collection of patterns and techniques.

    At the root of the application we wire up all necessary object graphs. This place is called the Composition Root, and we can use a DI Container to do this wiring for us, or we can do it manually (Pure DI).

    The point is that there’s only one place in your application where there’s a strong reference to a particular piece of technology (your DI Container). The rest of the app is blissfully unaware of how the object graph was wired up – all that matters is that all required dependencies were correctly injected (and you can use Constructor Injection with Null Guards to guarantee that this is so).

    The Abstract Factory pattern is a very useful pattern when it comes to DI. In essence, use Abstract Factory when:

    • You need to supply one or more parameters only known at run-time before you can resolve a dependency.
    • The lifetime of the dependency is conceptually shorter than the lifetime of the consumer.

    Examples and more information is available here:

    • Is there a pattern for initializing objects created via a DI container
    • Can't combine Factory / DI
    • Which DI container will satisfy this
    • Where should I do Injection with Ninject 2+ (and how do I arrange my Modules?)
    • Design – Where should objects be registered when using Windsor
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've been developing a site using ASP.NET MVC, and have decided to use the
I have decided that I really need to get some flowcharts for reverse engineering
I have a largish Mercurial repository that I've decided would be better as several
I have decided that all my WPF pages need to register a routed event.
Hey peoples, I've been studying Java for a couple of weeks, and have decided
I have some commits that I've decided, after the fact, are going to be
I've recently decided that I just have to finally learn C/C++, and there is
I decided to teach myself assembly language. I have realized that my program will
I have decided to use Simple XML serialization and was stucked with basic problem.
I have a blog, and i have decided to use Akismet and reCaptcha for

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.