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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T18:52:54+00:00 2026-05-17T18:52:54+00:00

Dependency injection looks great, however when I look at examples I often see lots

  • 0

Dependency injection looks great, however when I look at examples I often see lots of XML config file. This is not good because:

  • I don’t get compile time checking on the type names in the config files
  • Refactoring tools don’t update the confilg files when types are renamed
  • I don’t want the customers changing the configuration!
  • I am a C# programmer, and would rather not hide the logic of my application in XML.

Some frameworks will let you config them from code, however most of their documentation (and examples) assumes you are using XML, as the XML config came first.
So what dependency injection frameworks consider code based configuration to be the normal way of using them?

  • 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-17T18:52:55+00:00Added an answer on May 17, 2026 at 6:52 pm

    Almost all containers now have a code based API for registering dependencies, even those which were originally configured only via XML. And usually the XML approach is only recommended for edge-cases (e.g. where there maybe a need to change registration / wiring post-deployment)

    Eg StructureMap and Castle Windsor

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

Sidebar

Related Questions

Pretty new to dependency injection and I'm trying to figure out if this is
Dependency injection seems to be a good thing. In general, should dependencies be injected
Which C#/.NET Dependency Injection frameworks are worth looking into? And what can you say
I have been adding dependency injection to my code because it makes by code
I'm new to dependency injection, I'm wondering how you would handle the following scenario.
I have been looking at various dependency injection frameworks for .NET as I feel
I've been looking at some Ruby dependency injection libraries. In particularly, I checked out
I am trying to wire up dependency injection with Windsor to standard asp.net web
Interface Builder can be used for basic dependency injection in a Cocoa app, but
I'm using Castle Windsor to do some dependency injection, specifically I've abstracted the DAL

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.