Featured Posts

WPF and the Event Routing Paradigm, with Bacon Since the first event-driven language came down from the mountain and became part of the software development vernacular, there has been a certain notion of how an event works. Subscribe...

Read more

How to stop Expression Blend 4 RC from crashing on... So you’ve downloaded Expression Blend 4 RC but when you start it up, Blend crashes hard.  It’s never done that before, right? What do you do?  Well, you can...

Read more

The WPF Must-Grok List Robert A. Heinlein defined the word grok as: Grok means to understand so thoroughly that the observer becomes a part of the observed—to merge, blend, intermarry, lose identity...

Read more

Yes, Virginia, TextBlock.Text Will Support MultiBinding One of the features introduced to WPF in version 3.5 SP1 is the StringFormat property. If you’re unaware, StringFormat allows you to bring the String.Format capability...

Read more

Why Are WPF Developers Trying to Kill Menus? Somewhere along the line, and I’m not motivated enough to research it, menus apparently became bad.  I don’t mean they ever stopped working or became unsuitable for the...

Read more

using System.Windows; Rss

WPF On Your Shelf: Programming WPF, revisited 3 years later

Posted on : 25-05-2010 | By : Christopher Estep | In : Books

Tags: ,

0

I have a lot of technical books, particularly on WPF. I have most of the books released by the major publishers on WPF, unless it’s about VB. There are 2 books that are my absolute favorites and the first one is Programming WPF by Chris Sells and Ian Griffiths, published by O’Reilly in 2007.

 

Programming WPF

Why am I reviewing a 3 year old book? It is precisely because this book is 3 years old that I’ve chosen to review it now simply because the book is that good. Of all of the books that I use, this one has helped me more than any, without question. And it still helps me. 

Yesterday, when I was writing my post WPF and the Event Routing Paradigm, with Bacon, I went through my books to make sure that I was not only being accurate, but thorough. I wanted not only the conceptual overview and walkthrough, but plenty of technical meat so I could be certain that what I was writing would be truly useful for the people for whom I’ve written it. More importantly, I didn’t want any gaps or omissions.

Many of the books gave only a cursory explanation of Routed Events, something I find to be mindboggling. WPF isn’t easy and Routed Events aren’t intuitive. That’s why I chose the “racing pigs” metaphor. Makes you want to go look, doesn’t it? :) Of all of the book, only WPF had the technical depth I was looking for.

But it’s 3 years old!

So? Yes, we’re at WPF 4 and 3 versions of .NET later (3.5, 3.5 SP1, and 4.0), but the information in Programming WPF is simply that good that it doesn’t really matter. Most of what’s changed in WPF recently have been additions and not breaking changes. The books strength isn’t that it’s on the bleeding edge of technology, it’s that it leaves no stone unturned in what it does cover.

Positives

  • In depth – It covers its topics with such depth that it is very nearly a reference book on par with MSDN articles on the subject.
  • Broad – There are very few areas of WPF that are left untouched, including 3-D, printing, and text processing.
  • Accessible – The writing is very clear and understandable. Many writers may know their subject but no matter how many books they write, they still can’t quite explain their subject clearly. Griffiths and Sells don’t suffer with that problem.
  • Indispensable – This book is truly useful. It’s one you will pick up again and again until its pages are worn.
  • It’s heavy – At 835 pages through the index, think of the exercise you’ll get! It is exercise and it counts. That’s my story and I’m sticking to it.

Negatives

  • It’s dated – I have to say it. Some subjects just aren’t covered because they didn’t exist when the book is written. I can’t find that there’s going to be a 3rd edition, which would be a shame.
  • Silverlight chapter is useless – Sorry, Shawn. It’s just because it’s dated (see above).

I honestly can’t say enough good things about this book. It has helped me immensely over the past few years and it still is. If you don’t have Programming WPF, you seriously should consider getting it.

Popularity: 10%

WPF On-Your-Shelf: Applications = Code + Markup

Posted on : 22-10-2009 | By : Christopher Estep | In : Books

Tags: , , ,

0

We are technical people in the digital age.  We have more websites, videos, and blogs than you can shake a stick at and yet there’s something about that big heavy tome in your hands.  We like books.  Sure, you can get books on Kindle and read them that way, but it’s not the same.  Regardless, there are quite a few books on WPF and they all have their strengths and weaknesses.  Some completely gloss over certain aspects, while others do likewise with completely different topics.  There are different approaches and even gimmicks, like color (there, I said it.  And I’ll cover that one later.)

The first book I’d like to cover (pun fully intended) in my WPF On-Your-Shelf series is Applications = Code + Markup: A Guide to the Microsoft Windows Presentation Foundation, by Charles Petzold, published by Microsoft Press

Applications_Code_Markup_A=C+M (as I’ll be calling it) was one of the first major books on WPF, released over 3 years ago.  The philosophy in this book remains unique, even today, best described by the author himself:

I have been writing programs for Windows since 1985, and the WPF is the most exciting development in Windows programming that I’ve experienced. But because it supports two very different programming interfaces, the WPF has also presented great challenges for me in writing this book. After giving the matter much thought, I decided that every WPF programmer should have a solid foundation in writing WPF applications entirely in code. For that reason, Part I of this book shows you how to write complete WPF programs using C#.

Several features of the WPF required enhancements to .NET properties and events, and it’s important to understand these enhancements, particularly when you’re working with XAML. For this reason, I have devoted chapters in Part I specifically to the new concepts of dependency properties and routed input events.

Part II of this book focuses on XAML. I show how to create small XAML-only applications and also how to combine XAML with C# code in creating larger, more sophisticated applications. One of the first jobs I take on in Part II is to create a programming tool called XAML Cruncher that has helped me a lot in learning XAML, and which I hope will help you as well. Because XAML is used primarily to create the visuals of an application, most of the graphics coverage in this book is found in Part II.

In the long run, most of the XAML that gets written in this world will probably be generated by interactive designers and other programming tools. I’m sure that you will eventually use these designers and tools yourself to facilitate the development of your applications. However, I think it’s vital for every WPF programmer to be able to write XAML “manually,” and that’s what I show you how to do in this book.

Even now, I can find no book that takes this approach, which is unfortunate.  Petzold expertly demonstrates that WPF and XAML are not synonymous and then immediately teaches you how to use XAML.  It’s this separation of concerns that makes the book so brilliant.  Every other book on WPF I’ve read (and I’ve read most of them) focuses almost exclusively on the “how” with just a passing overview as to the “what”.  Granted, there are some excellent books that do cover both procedural code (almost always C#, unfortunately for VB programmers) and declarative XAML, only A=C+M treats them as what I would call “windows to the framework” and not the framework itself.

It’s important, even crucial to remember (as I’ve said before) that WPF is not the language.  This book not only remembers it, it’s written around that very concept.

Let me give you a personal example to illustrate what I mean.

I recently interviewed with a very interesting company for a VB.Net/ASP.Net/WinForms and my primary language is C#. Granted, I have VB but it’s not what most of my contracts have required.  Because of the .Net Framework and BCL, I was able to honestly tell them that I can still do the job because most of what differentiates the two is “syntactic sugar” (yes, I know there are some real differences, but those are minor except for XML Literals and one or two others).  It is the framework that makes .Net powerful and likewise it is the fact that WPF is a framework and foundation (and NOT a language or platform) that make it so powerful.  Charles Petzold absolutely nails that concept and drives it home by devoting half the book to creating WPF with procedural code.

The end result is that you come away from reading the A=C+M not only with a greater understanding of WPF, but a better “internalization” of what WPF actually is.  By doing so much in C#, you internally begin to understand how WPF can be done in any language that can use the .Net Framework.  This includes F#, IronRuby, and so on.  You understand that you’re writing for WPF not in WPF.

As you can undoubtedly gather, I’m very much impressed by this book and it remains to this day one of my favorites.  I believe it is an essential read for anyone who truly desires to be the best WPF developer he or she can be.

Popularity: 12%