Why is xml so prominently displayed in IOC containers?

I am trying to get into IOC containers, and I notice that many of them use xml configuration. Can someone tell me why many new technologies are moving towards xml configuration / software models (WCF, WPF, Spring.NET, Unity, Windsor)? It seems that xml is a poor choice for defining complex settings, and it would be better to do this in code where things are typical and we have intellisense. I know that some may find this argument, but I'm really curious why these otherwise awesome, cutting-edge technologies rely on xml.

+5
source share
10 answers

I moved the Unity configuration to XML for only one reason - I can change the configuration without recompiling my code. This is very useful in some cases.

+6
source

He likes to wonder why the hammer has a steel head when you prefer to glue things together.

Building the application at runtime from declarative configuration files is the goal; DI itself is just a means to achieve it.

If you can copy the configuration, why use the IoC framework? Take a slightly more solid design and save yourself the pain.

+5
source

, IoC, mxmissile ( Unity).

, ( ), -, ? ( , ), . . , , , , .

, , - . ( ), .

+4

"" .

, XML .

, , "" .

, , .

, , , , , XML, text/plain, .

, , XML.

+3

IoC / , , IoC.

XML :

  • , verbalize .
  • , ( , , ). , , API.

Fluent API , , , , XML.

. XML IoC: .

+3

Java , , Spring , Google Guice.

: , Spring.... . , .

+2

, .net. web.config, . , XML, . , -, , . , XML - . , .net , XML.

+2

XML- , " ". , , , - , . (, CSV), INI, JSON , .

XML , XML- , .

+2

xml. , eclipse Spring, , , javadoc , , , bean, .. pp.

DSL, . . , ( ) Java? -?

As to why they run in XML, I assume that DSL is required, and XML has the advantage of the existing rudimentary toolchain (editors, validators, parsers, etc.).

+1
source

No one mentioned that XML can be the result of an XSLT transformation, and custom DSLs can be created this way on top of a simple IoC configuration. This is a very powerful approach.

+1
source

All Articles