Back to list
Views:   9.7K
Replies:  1

What are Structure Map and Spring.Net?

What are the differences between Structure Map and Spring.Net? Why they are used? Are these new patterns?  

As far as I understand  these are IOC(Inversion of Control) and use DI (Dependency Injection) with xml-based configuration files. Enterprise Library 1.1 is using DI, Plugin, and Factory Method, based on an xml configuration file (Configuraton Context etc...).
What is the difference between the two? Which one should I use?  I am confused and need some kind of a roadmap.
Thank you.
Volkan Genç, Jun 22, 2010
I'd also give LightCore a try... it's like the name suggests a light weight DI container that's still sort of feature rich. ;-) The website is in german, I believe, but I am sure, you will find the code interesting (
Jul 01, 2010
If you're interested in a dependeny injector, I'd recommend you take a look at Ninject ( It doesn't use any Xml for its configuration, and it is easy to get started with.
Jun 27, 2010
Reply 1
What I don't understand is, you obviously seem to know the buzzwords (StructureMap, Spring.NET, Enterprise Library, Inversion of Control, Dependency Injection, etc...). Why are you not able to put the pieces together on your own?

To sum it up a little:
  • Both StructureMap and Spring.Net are Frameworks as well as the Enterprise Library is
  • StructureMap is known as the oldest IoC Container offering Dependency Injection for .NET based development
  • Spring.Net is a framework that is supposed to make life as a developer easier (containing features like e.g. object relational mapping through NHibernate, better Databinding and Validation for ASP.NE, Remoting, UnitTesting and more. Amongst those features, you can find the Spring.Net Core which is essentially its own IoC Container.
  • Enterprise Library is a library of modules based on best practices featured by Microsoft. It has a lot of so called Application Blocks (Validation for example) and further more uses Unity as a base for its own IoC Container.
Dependency Injection and Inversion of Control are pattern that allow you decouple your concrete implementation of some functionality from the logic of your code. By configuration through an xml file or even dynamically at runtime, you can decide which concrete implementation of an interface you are going to work with.

Hope that helps.
Christian Jacob, Jun 24, 2010
Stay Inspired!
Join other developers and designers who have already signed up for our mailing list.
Terms     Privacy     Cookies       Do Not Sell       Licensing      
Made with    in Austin, Texas.  - vsn 44.0.0
© Data & Object Factory, LLC.