Andrew Stopford's Weblog

poobah

News

Articles

MbUnit Folks

Old Blogs

Spring.NET

I am a JavaLobby news letter subscriber and this weeks edition talks about the Spring framework. It's something I really know next to nothing about but it made me curious and I explored the site to find Spring.NET, check out this article on MSDN as well. Have other folks have experince with this?
Posted: Jun 08 2006, 09:38 AM by astopford | with 6 comment(s)
Filed under: ,

Comments

Kevin D. White said:

The ObjectBuilder inside The Microsoft CAB & Enterprise Application Library is another example of a Dependency Injection framework. Unfortunately Object Builder is not well documented.
# June 8, 2006 11:42 AM

Jeffrey Palermo said:

I would strongly recommend StructureMap.  It is another open-source dependency injection library, and it's available for .Net 1.1 & 2.0 (with generics).  It uses attributes or xml for the mapping meta-data, and it's a cinch to use.

Just google "StructureMap" for all the details.  There are several people who have blogged examples of it.
# June 8, 2006 1:18 PM

sral said:

Spring.net offers some cool functionality. However, the framework lacks a loot of the "killer" features the java version has. You should def play arround with it if you can
# June 8, 2006 2:56 PM

Bryan said:

I've had problems wiring up runtime dependencies with spring.  If I have to wire up the dependencies based on data provided by the user at runtime, I'm still falling back to coding it myself.  Spring is better for static dependencies.

That being said, the XML file is unwieldy and isn't typesafe.  After adding only a few 10's of objects, I had to break it up into multiple files and even then it was hard to manage.  The format is not information dense, so you have to look at sceen upon screen upon screen of verbose XML to have any kind of a clue as to what's going on.  That's a big problem.

The concepts behind central configuration and IoC are fantastic, but I'm not sold on Spring's implementation of it myself.  

These days, I follow IoC religiously, but use a simple runtime loaded Python or Boo script to wire everything together.  I much prefer this to the current iteration of Spring.  The scripts are turing complete and information dense, but can also be as simple as a config file.  The only drawback is loss of compile time safety, but that is a reasonable tradeoff when you want to configure things more readily at runtime.  Besides, if you want the compile time safety you can always write an assembly in C# that does the same and load it into it's own app domain. Best of both worlds, and no XML anywhere.  :)

Bryan
# June 8, 2006 5:27 PM

hammett said:

I'd recommend Castle Windsor, obviously ;-)

Bryan, I didn't get your requirements, and neither your proposal. Aside from that, boo is statically compiled. Anyway, feel free to contact me and I'll try to see if Castle is able to fulfill this kind of requirements and if not, put it on the road map.
# June 9, 2006 4:02 PM

Bruno Baia said:

Hi,

We started working on a intial support for WPF.

Check it out :

http://forum.springframework.net/showthread.php?t=985

Bruno

# December 5, 2006 2:35 AM
Leave a Comment

(required) 

(required) 

(optional)

(required)