Title: C# Programming with the Public Beta Author: B. Harvey, S. Robinson, J. Templeman, and K. Watson Publisher: WROX, 2000 Pages: 393 ISBN: 1-861004-87-7 Price: $34.99 Web: <www.wrox.com> C# Programming with the Public Beta is definitely written for the programmer who feels he must get in there first to find out what this .NET stuff is all about. Although well written, it attempts to cover an incredibly broad range of topics that would normally span a dozen books, each at least twice as thick.
Despite its title, only 4 of the 14 chapters are strictly dedicated to C# programming per se. The other chapters give a brief summary of Visual Studio.NET (VS.NET), the .NET base classes, using existing COM components in .NET, ADO.NET, and finally ASP.NET and web services.
The books coverage of C# assumes the reader is already quite familiar with either C++ or Java and highlights commonality and, more importantly, any subtle differences. Indeed anyone already familiar with C++ or Java will quickly feel comfortable programming in C#. The book makes use of this and covers the basic syntax quite quickly. It goes on to focus on issues more specific to .NET and the .NET base classes.
The later chapters focus on the more advanced concepts and some of the design philosophy changes specific to .NETs implementation of other familiar Microsoft technologies, such as ADO and ASP. Generally, the authors limit themselves to just one example per chapter and walk through how to make use of any specific support that is built in to VS.NET to help you. As they go through the various examples using VS.NET, they point out what doesnt quite work in the current beta and how certain things should work in the final release.
The very fact that it is written around a beta release of what looks to be a rapidly evolving product means that it is likely to have a very short lifetime as a reference book. Given that each chapter is generally no more than 20-30 pages, this is not the book to get if you are looking for a complete and detailed discussion of the topics covered.
Now having said all that, I do think it is a good book; it does give the reader a broad understanding of what .NET covers from a programming point of view and a feeling of what Microsoft has taken on with their .NET initiative.
It is however targeted to the developers who want to get going as quick as possible with bleeding edge technology, but there is no doubt that this book will date very quickly.
Title: A Programmers Introduction to C#, Second Edition Author: Eric Gunnerson Publisher: Apress, 2000 Pages: 540 ISBN: 1-893115-62-3 Price: $39.95 Web: <www.apress.com> I found this edition of Gunnersons book considerably easier to review than the first. While reviewing the first edition, I felt that many chapters could have justified much more detail, while others added very little value overall. Whilst this edition is not necessarily a complete rewrite, he certainly has added to it considerably (almost 200 pages in fact). However, the first few chapters cover very briefly the concepts of OO (object-oriented) programming, the advantages of the .NET run-time environment, and an overview of the development environment and tools. These chapters could easily have been dropped or condensed into one introductory chapter.
The next five to six chapters focus on classes in general and then the various specifics of C# classes covering some of the basic concepts, such as inheritance, overloading, fields, members, constructors, etc. The author gives simple examples to show various constructs and syntax.
In Chapter 9, which covers structs, he starts to delve into the concepts of boxing and unboxing; however he leaves this topic all to quickly before he can do it much justice. It is a personal opinion that although this is a simple concept to an experienced programmer it can and does cause more than its fair share of consternation for beginners.
Interfaces are covered very well in the next chapter with many good examples, recommendations, and practices. By contrast the following chapter on versioning is almost included as an afterthought covering only three pages.
For the next four or five chapters, the author focuses on the basic syntax of the language, and the writing style of the chapters takes on much more of a language reference format. There is not much that can be written about the arithmetic operators (+, -, *, /, etc.) that can stir up passion and excitement!
From the chapters on arrays and strings onwards, Gunnerson starts to explore some of the more powerful features that an experienced programmer would be interested in. The level of interest however does depend on whether the reader comes from a C++ or Java background. To the Java programmer, the subsequent chapters on properties, indexers, enumerators, attributes, delegates, and events do not necessarily offer any new concepts, mainly syntax/implementation variations. To the C++ programmer, the chapters offer a bit more. It is here that the book starts living up to its name, an Introduction to C#.
The next few chapters jump around a bit. From Chapter 27 onwards, Gunnerson starts introducing the .NET framework and some of the .NET framework classes, such as System.Array and Collection classes. He then has a very good chapter on threading and asynchronous operations, followed by a mildly interesting chapter on execution-time code generation that talks about the possibilities of self modifying code, and then finally an Interop chapter, which covers using COM objects and calling native DLL functions.
The author eventually ties these diverse areas together over the next three or four chapters as he goes from introducing Windows forms to building a full working example of a simple Windows application, which displays disk usage and differences over time. In these few chapters, I feel that the majority of programmers will get the most from the book. He does a very good job putting it all together in a very readable form based on a real application. Out of all the chapters, I think these are the ones in which it feels the author falls into a writing style that is most comfortable for both him and the reader. It is written as a combination of tutorial and code walk through and does not feel heavy to read.
The remaining chapters are eclectic. The chapter Deeper into C# appears to be a catch all for all the things the author felt he should include, but didnt know where to put them. Among other things, he talks about C# style issues, XML documentation, garbage collection, unsafe code, and reflection to mention but a few!
In writing book reviews, I try to look at a book through the eyes of the intended audience. I feel this book still suffers a little from some of the same shortcomings of the first edition, in that the author tries to cover too much and write both an introductory guide to .NET and C# for the beginner and a comprehensive reference book for the experienced developer, achieving neither rather well. The depth of the chapters still, as in the first edition, varies throughout the book with some being little more than overviews. However, with this edition, he has succeeded in catering a little more to the experienced developer. He has added several more advanced chapters, fleshed out some of the more vague ones, and has included more comprehensive examples.
Eric Gunnerson has the dubious honor of being one of the first few authors to publish a book on C# programming and by default the .NET framework. As he started writing the first edition well before even the first beta was released, it would be unreasonable to expect him to commit to writing about details that probably didnt exist or were evolving at the time. With the second release of the .NET framework, he had a firmer foundation to build on, and to his credit, he has expanded the content and depth greatly to match. Unlike his first edition, I can now recommend this book, which comes closer to living up to its title for an experienced developer. It is still only an introduction, and most experienced developers will grow out of it rather quickly. I feel that he can still improve on it considerably. With a third edition almost guaranteed on the final release of .NET, I believe he has scope to refine it further. Seeing the improvements in this edition from the last, I believe he is well capable of delivering an even better version next time.
William Cirillo is an independent software consultant. He has been developing Unix, DOS, and Windows NT applications for the past 15 years. In his spare time, he is trying to write his first novel and finding it harder than he thought!