I've used Spring and Spring.NET quite a bit, but I would like to see what else is out there. Can anyone recommend a good Java or .NET framework that I could try to learn?
问题:
回答1:
Here is a list of IoC containers from the good Mr. Hanselman...
回答2:
Castle Windsor is very popular, you could do worse than learn that.
回答3:
On the .Net side, Ninject is probably the most interesting, on the Java side, I would say check out Google Guice. That being said, DI is DI, and they all more or less do the same thing. The differences are mostly in how they are configured.
回答4:
Google Guice is very good - unless you really need it, there are no .xml configuration files - everything is done via annotations, and in an ideal world you can avoid setter methods, injecting your dependencies via the constructor.
回答5:
I'd suggest JBoss Seam. It has a very different dependency injection model than Spring. Seam's DI is bidirectional and able to inject values at every stage in an object's life (not just during initialization).
It's certainly not a good for everything, but if your looking to try different things in DI, this is interesting.
Look at Seam's home page.
回答6:
So in the wide world of software you feel the need to learn what is 'assumed plumbing' rather than expand your base? You just use IoC. It's not even optional for anyone serious. This is going on like a decade now.
Go master Functional Programming in say F#. Master the new IObserver and related work coming in .NET 4.0 as the conceptual pairing to IEnumerable. Write a domain specific language for your domain of choice. Create New abstractions, don't simply relearn old ones.