Joe White’s Blog

Life, .NET, and Cats

Archive for July, 2009

Monkeysphere meets Twitter

Saturday, July 11th, 2009

People with less than 150 Twitter followers tend to follow them back. Past that, the rate falls off dramatically.

If you’ve heard of the Monkeysphere, the number 150 sounds pretty familiar, doesn’t it?

Micro-rant: Ninject and IKernel

Tuesday, July 7th, 2009

Ninject looks cool. So does Autofac, but Ninject has automatic self-binding.

But I hate how Ninject calls its container “IKernel”.

This is the one part of Ninject that you are guaranteed to use. (Well, I guess you need modules too — not that that name is much better.) IKernel is the single most visible part of the Ninject API. And its name is absolutely wretched.

It’s named for its implementation, with no regard to its usage. In real life, it isn’t a kernel; it belongs to the kernel module in Ninject’s modular implementation. Don’t get me wrong, I appreciate that it’s modular. But don’t make me, as a dev who just wants to use a DI framework, suffer through that implementation detail.

Nobody should have to care what a “kernel” is unless they’re writing their own. “Kernel” means nothing to someone using the container (which is almost everybody). The name is not just distracting, it’s outright misleading — it actively suggests “this is not a container”, when in fact it’s exactly a container, keeper of the Get<T> method.

I really want to give Ninject an honest try, but this seriously bugs me. Why not “IContainer”? Or something that isn’t a lie? (Yeah, I know they’re ninjas and all, but shouldn’t the subterfuge be reserved for the enemy?)

Joe White's Blog copyright © 2004-2011. Portions of the site layout use Yahoo! YUI Reset, Fonts, and Grids.
Proudly powered by WordPress. Entries (RSS) and Comments (RSS). Privacy policy