S h o r t S t o r i e s

// Tales from software development

Pro C# 2010 and the .NET 4 Platform

leave a comment »

I’ve come to regard Andrew Troelsen’s Pro C# and the .NET Platform as the best single book reference for C# programming and didn’t hesitate to buy the fifth edition, Pro C# 2010 and the .NET 4.0 Platform, when it was recently published.

The first disappointment was that, unlike the previous editions, Apress has published it as a paperback rather than a hardback. I guess they’re trying to keep costs down but, as this is a book that you’re likely to keep close to hand as a reference rather than read once and discard, I feel it warrants a hardback edition. As a paperback, it’s a nightmare to try to hold while you’re reading it as it’s a large heavy book at 1712 pages and nearly 6lb. The ebook is not quite as heavy 😉

Troelsen has to tread a difficult line for each new edition in choosing which material from the previous edition should be discarded, refreshed, or rewritten. In this edition he seems a little inconsistent in his choices. As an example, WPF is covered is detail while Windows Forms has been relegated to an appendix. Fair enough, although I’d personally have thought that the continued use of Windows Forms for commercial applications justifies its inclusion as a chapter. However, outside of the WPF chapters the examples tend to use Windows Forms. Presumably because Troelsen either didn’t have the time or inclination to rework the example code for WPF. It’s not a problem for anyone familiar with Windows Forms but it would be a problem for someone new to .NET. In effect, they’re going to have to learn Windows Forms just for the examples even though they might never use Windows Forms in any programs they write, preferring to learn and use WPF instead.

It’s also difficult to find a balance between writing a complete reference specific to this version of .NET but also highlighting the new features of .NET 4.0. Troelsen tries to do this using callout sections that highlight new or changed functionality but, personally, I think .NET 4.0 needs more than this. A preface chapter introducing .NET 4 would have been useful.

More problematic is the complete omission of some significant .NET 4.0 features. Troelsen demonstrates how to implement a plugin archtecture using dynamically loaded assemblies and reflection, i.e. the traditional way. But there is no mention of MEF. In fact, the whole 1712 pages is complete MEF-free – it doesn’t appear anywhere in the book. There doesn’t appear to be any coverage of ASP.NET MVC or AJAX either. I understand that it’s difficult to cover the entire .NET platform in a single book (although the title implies that the book does this) but surely it’s reasonable to at least mention the areas that are not covered ? Not mentioning MEF when discussing plugin programming is likely to lead some developers down the wrong path.

Finally, as regards the ebook version – in the past, purchasers of the hardcopy edition could download a free copy of the ebook. This time around Apress is charging ten dollars for the ebook. That’s still a great deal but it’s a shame it’s no longer free if you’ve already bought the hardcopy.

In summary, I’d still recommend the book but I’m disappointed at the omissions, the lack of an overview of .NET 4 changes, and that it’s a paperback rather than a hardback.

Advertisements

Written by Sea Monkey

July 14, 2010 at 6:00 pm

Posted in Books

Tagged with

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: