Essential .NET Volume 1 - Don Box with Chris Sells

I still have essentially no practical experience with .NET. What I was particularly uninterested in doing was reading about it from the 'C# is a clone of Java' angle of things, or even the more abstract '.NET is a bytecode platform, rather like the JVM' view. So, I got this book.

Don Box wrote the canonical COM book, and the nice thing about this book is that it tries to treat .NET as a super-extended COM. Apparently, all this busines with exposing lots of .NET types in assemblies is really about making the interface self-describing, in a way that COM interfaces aren't. The complexities of assemblies and how to load them are a reaction to the DLL hell of COM objects. Viewed from this angle, the .NET bytecode is nothing more than a mechanism to avoid having to specify the low-level details of how components communicate, by allowing the JIT compiler to decide on the fly!

In other words, .NET isn't a Java competitor, but just the second-system effect applied to a (relatively simple!) interop mechanism! In the wider context of MS's reaction to Java, this is not entirely plausible, but it does have a certain consistent internal logic.

The book cannot avoid the fact that large chunks of the CLR do feel like a slightly improved JVM, and those bits (the majority of the book, in fact) do get rather tedious. The start and the end are the most fun. The start because it introduces the CLR as an extended COM, and the end because it shows how the CLR is actually constructed, including how it can be used as a COM component - closing the loop, as it were.

The book's rather long in the tooth now - it was apparently released before a final production version of the CLR was available, which gives you a bit of an idea. Things may well have moved on - as I said, I have little practical experience with .NET. On the other hand, it's great to read a book which breaks open the abstraction layer and gets its hands dirty on this kind of architecture. I'm not sure how many of the other books dare to do this. Weakly recommended (a lot of it's still tedious!).

Posted 2012-01-15.