As I've mentioned in an earlier blog, I've been playing around with Spring.NET in my spare time. What has resulted from that is a .NET version of the Knight example from chapter 1 of Spring in Action. You can download the code (complete with an NAnt build) from here.
If you use NAnt to build it, the default target ("cs-build") will build the C# version. If you'd like to build the VB.NET version instead, use the "vb-build" target. Be aware, however, that I've had some trouble building the VB.NET version under Mono. I can manually compile it fine, but NAnt gives me all sorts of errors. Oddly, this only happens under Mono. When I build it on my wife's XP machine, it works fine.
This has been a bit of an adventure as I've got to learn C#, VB.NET, Spring.NET, Mono, and NAnt all at once. (My next trick is to figure out log4net so that I can use that instead of Console.WriteLine.)
Here's what I've learned about Spring.NET so far:
- The current download (version 0.6) is only the IoC container and very little else.
- AOP and web stuff will be in the next version (0.7), but you can get a sneak-peak by downloading the nightly builds. (The Knight example comes with Spring.Core.dll and Spring.Aop.dll from the May 15th nightly build.)
- As I've stated before, at least with regard to IoC, the main difference between Spring (Java edition) and Spring.NET is that you change the word "Bean" to "Object".
- The only other minor difference is that when you specify an object type in the XML, you must also specify the assembly that the class can be found in.