I have to admit I’m not that familiar with O’Reilly’s In a Nutshell line of reference titles. But at the suggestion of Builder.com editor Tony Patton, I checked out VB.NET Core Classes in a Nutshell. Now, I’m not sure how I ever got along without one of these reference manuals in my technical-book library.
VB.NET Core Classes in a Nutshell (I'll call it Nutshell from here on) is a reference to the entire .NET Foundation Class Library (FCL). The FCL organizes all the namespaces under the root System namespace. The book's coverage of the FCL makes it a useful counterpart to Microsoft’s online MSDN documentation—with the added advantage that you don’t need an active Internet connection to use it.
Nutshell in detail
The book begins with a brief rundown of the FCL’s structure and organization into multiple namespaces and a discussion of the advantages that the FCL has over older technologies, such as COM and Win32 API. It also illustrates the use of namespaces in practice. Although this section isn't detailed enough to provide a complete backgrounder for .NET neophytes, it's complete enough to serve as a useful quick reference in case your pointer to some bit of information in your memory becomes corrupted or mysteriously deleted.
The meat of the book is in part two. This section is divided into 23 chapters, each devoted to a single FCL namespace. At the beginning of each chapter, you’ll find a pseudo-UML diagram of the class hierarchy for that namespace and a rundown of all the classes contained in it. Nutshell also features a thumb index along the edge of the book, which makes locating a particular chapter, and therefore a particular namespace, a cinch.
The class listings for each namespace are detailed but brief. Each consists of a few paragraphs explaining the use of the class and a complete listing of all methods, enumerations, and interfaces associated with the class, along with some informational tags indicating special properties, such as whether the class is serializable. The method signature listings are given in VB.NET syntax, as you’d expect from the title, and all enumerations are completely defined. The only thing missing here is method-level documentation, but that was probably omitted to keep the book down to a manageable size.
Nutshell wraps up with a series of appendices that serve as a further reference to certain new features of the .NET platform. Nestled within these final pages, you'll find a reference to regular expression and format specifier arguments—which, to me anyway, would make the book worth the purchase price by themselves. There's also a .NET-to-COM data conversion reference and a table that lists which physical DLL files correspond to an individual namespace.
The final appendix, an index to all types, methods, properties, events, and fields mentioned in Nutshell, is a really nice touch. O’Reilly could have included just a type-name index without seriously compromising the reference value of the book, but providing property and field names makes it much easier to locate a class given only a name of an item in the class's interface.
How’d they put all this together?
I was so impressed with the completeness of Nutshell, I began to wonder how the authors gathered all the information. According to the introduction, they used .NET’s Reflection API (which is covered in detail in Chapter 13) to produce the class information listings.
With Nutshell, O’Reilly continues a tradition that seems to be dying in an era of Internet sites and waning profits: It bundled a CD along with the book. Attached to the back cover, you’ll find an electronic version of the class documentation contained in the book. The CD, called VB.NET Core Classes in a Nutshell for Microsoft Visual Studio.NET, can be installed as a help add-in to Visual Studio .NET. This electronic version almost exactly replicates the contents of the book, with the added convenience of hyperlinks to a class’s documentation page each time the class is mentioned.
My initial thinking was that the electronic version would simply be redundant information when combined with the MSDN documentation libraries. It turns out, however, that in add-in form, it’s much more convenient than the mammoth HTML-Help MSDN documentation when you are attempting to locate a single class’s description. It’s better organized as well.
Definitely worth a look
Nutshell certainly isn’t a book you’ll want to read from cover to cover. And if you’re looking for an introduction to programming the .NET FCL, you’ll need to look elsewhere. If, on the other hand, you’re tired of wading through Microsoft’s documentation just to get an overview of a particular class, this book fits the bill, especially with the electronic version thrown into the mix.
I’m thinking that Nutshell could have used a bit of source code and perhaps brief method documentation, but even with these minor quibbles, I’m still mighty impressed. In fact, I’m so impressed with this book that I’d recommend it—along with any of O’Reilly’s other Nutshell titles—to anyone looking for a serious language reference book.