Skip to main content

Which .NET Dependency Injection frameworks are worth looking into?


Which C#/.NET Dependency Injection frameworks are worth looking into? And what can you say about their complexity and speed.



Source: Tips4allCCNA FINAL EXAM

Comments

  1. I suppose I might be being a bit picky here but it's important to note DI (Dependency Injection) is a programming pattern and is facilitated by (but does not require) an IoC (Inversion of Control) Framework. IoC Frameworks just make DI much easier, but it's not only DI that they do, they provide a host of other benefits over and above DI.

    That being said, I'm sure that's what you were asking: about IoC Frameworks: I used to use Spring.Net and CastleWindsor a lot, but the real pain in the beehiind was all that pesky XML config you had to write! They're pretty much all moving this way now, but I started using StructureMap for the last year or so, and since it has moved to a fluent config using strongly typed generics and a registry, my pain barrier in using IoC has dropped below zero! I get an absolute kick out of knowing now that my IoC config is checked at compile-time (for the most part) and I have had nothing but joy with StructureMap and its speed. I won't say that the others were slow (runtime), but they were more difficult for me to setup and frustration often won the day.

    I believe they're all moving towards a more strongly typed config now - or at least providing the option, but some people love putting all the config in XML - personally I can't bare it, so I have stuck to StructureMap now.

    I can't comment much on Ninject except that I listened to Nate on one of the Herding Code podcasts and he's one switched-on guy, and the screencasts I've watched have really tempted me to try it out - maybe on the next project - who knows.

    Update: In a follow up to my comments here, I've been using Ninject (as promised) on my latest project and it has been an absolute pleasure to use. Words fail me a bit here, but (as we say in the UK) this framework is the Dogs'. I highly recommend it for any green fields projects where you want to be up and running quickly. I got all I needed from a fantastic set of Ninject screencasts by Justin Etheredge. I also can't see that retro-fitting Ninject into existing (above average) code being a problem at all - but then the same could be said of StructureMap in my experience. It'll be a tough choice going forward between those two, but I'd rather have competition than stagnation and there's a decent amount of healthy competition out there.

    Other IoC screencasts can also be found here on Dimecasts.

    Hope that helps,

    Rob G

    ReplyDelete

Post a Comment

Popular posts from this blog

Slow Android emulator

I have a 2.67 GHz Celeron processor, 1.21 GB of RAM on a x86 Windows XP Professional machine. My understanding is that the Android emulator should start fairly quickly on such a machine, but for me it does not. I have followed all instructions in setting up the IDE, SDKs, JDKs and such and have had some success in staring the emulator quickly but is very particulary. How can I, if possible, fix this problem?

CCNA 1 Final Exam 2011 latest (hot hot hot)

  Hi! I have been posted content of ccna1 final exam (latest and only question.) I will post the answer and insert image on sunday. If you care, please subscribe your email an become a first person have full test content. Subcribe now  Some question  have not content because this question have images content. So that can you wait for me? SUNDAY 1. A user sees the command prompt: Router(config-if)# . What task can be performed at this mode? Reload the device. Perform basic tests. Configure individual interfaces. Configure individual terminal lines. 2. Refer to the exhibit. Host A attempts to establish a TCP/IP session with host C. During this attempt, a frame was captured with the source MAC address 0050.7320.D632 and the destination MAC address 0030.8517.44C4. The packet inside the captured frame has an IP source address 192.168.7.5, and the destination IP address is 192.168.219.24. At which point in the network was this packet captured? leaving host A leaving ATL leaving...