How to Code .NET
Except for the fact that this book is poorly titled and overpriced, How to Code .NET: Tips and Tricks for Coding .NET 1.1 and .NET 2.0 Applications Effectively is an otherwise excellent source of knowledge for advanced .NET C# programmers. There are few .NET titles on the market today that delve into the intricacies of .NET coding with such voracious depth and hard-found wisdom as this book exposes. Most notably, author Christian Gross is a programmer s programmer, and avoids marketecture exercises and shill propaganda and instead provides straight talking, real-world advice. In fact, it struck me that on page 76, Gross advised his readers that it is extremely important to write code that is verbose, and does not use tricks. Hmmm what s the title of this book?
Apress incorrectly classifies this book as being for Beginner/Intermediate-level .NET developers. No way. More likely, only experienced Intermediate/Advanced readers will grok and appreciate the nuances explored. There is no ramp up, no let me introduce a few concepts for you coddling. Rather, the first page jumps right in with NUnit testing, reminding readers that they must employ a Test Driven Development (TDD) methodology to make sure stupid errors will not happen. After a few NUnit examples, the Nmock library is used to demonstrate the use of mock objects ( fake objects with a given purpose ) in TDD. Chapter 2 examines certain aspects of the .NET Framework and runtime that are either glossed over or not mentioned at all in other .NET texts. Structure probing via MSIL analysis, delegate usage, assembly versioning recommendations and signing, dynamic assembly loading/unloading, GetHashCode, and Generics are dissected with enough detail to reveal their full potentials.
Chapter 3 digs into strings and text-related classes, reminding readers that we live in a multi-language world. As such, the examples deal with Unicode, calendar, and money representation, as well as programming exercises such as parsing multi-formatted strings from a buffer, using the StringBuilder class, and string searches and closes with showing how the ToString method can be used for everything from indented buffer output to structured exception handling.
The final chapter, covering C# coding solutions, is also the longest, consuming nearly half the book. Topics include understanding and using the yield keyword, inheritance, interface implementation, recommended namespace, class and interface naming conventions, understanding the overloaded return type/property, nullable types, several design patterns (such as the Factory pattern), marker interfaces, and functors ( a mechanism where within the code you define a placeholder or functionality that acts as a pass-through filter before an actual functionality whew!).
The book is brief but densely packed with segments that may require a second or third reading to have the ideas fully take root. Unfortunately, it ends as abruptly as it begins, leaving readers and reviewers like me wondering if there was supposed to be additional content that was dropped or unfinished. Still, it s a powerful educational experience that warrants consideration by any sophisticated developer seeking to further refine their deep understanding of key aspects of the .NET Framework that they will rarely find anywhere else.
Title: How to Code .NET
Author: Christian Gross
Page Count: 232