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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T04:00:31+00:00 2026-05-11T04:00:31+00:00

After reading the nice answers in this question , I watched the screencasts by

  • 0

After reading the nice answers in this question, I watched the screencasts by Justin Etheredge. It all seems very nice, with a minimum of setup you get DI right from your code.

Now the question that creeps up to me is: why would you want to use a DI framework that doesn’t use configuration files? Isn’t that the whole point of using a DI infrastructure so that you can alter the behaviour (the ‘strategy’, so to speak) after building/releasing/whatever the code?

Can anyone give me a good use case that validates using a non-configured DI like Ninject?

  • 1 1 Answer
  • 4 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. 2026-05-11T04:00:32+00:00Added an answer on May 11, 2026 at 4:00 am

    I don’t think you want a DI-framework without configuration. I think you want a DI-framework with the configuration you need.

    I’ll take spring as an example. Back in the ‘old days’ we used to put everything in XML files to make everything configurable.

    When switching to fully annotated regime you basically define which component roles yor application contains. So a given service may for instance have one implementation which is for ‘regular runtime’ where there is another implementation that belongs in the ‘Stubbed’ version of the application. Furthermore, when wiring for integration tests you may be using a third implementation.

    When looking at the problem this way you quickly realize that most applications only contain a very limited set of component roles in the runtime – these are the things that actually cause different versions of a component to be used. And usually a given implementation of a component is always bound to this role; it is really the reason-of-existence of that implementation.

    So if you let the ‘configuration’ simply specify which component roles you require, you can get away without much more configuration at all. Of course, there’s always going to be exceptions, but then you just handle the exceptions instead.

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

Sidebar

Related Questions

After reading answer to this question: Make "make" default to "make -j 8" I
After reading this question, I need to clear up some things. IQueryable<Customer> custs =
Drakon editor seems nice http://java.dzone.com/announcements/drakon-editor-19-support-java but after reading the doc http://drakon-editor.sourceforge.net/csharp.pdf I still don't
I am beginning to study the very nice CMS Orchard and, after reading the
After reading this question , I was reminded of when I was taught Java
After reading this answer I've tried to play with this nice feature by myself
After reading this nice article (The Care and Feeding of Pre-Compiled Headers), I have
After reading monkeytalk faq from http://www.gorillalogic.com/testing-tools/monkeytalk/documentation/monkeytalk-faq : How does it all work? MonkeyTalk is
After reading the Bash man pages and with respect to this post , I
After reading this article, it makes sense to rebase to gather changes from the

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.