Applications = Code + Markup: A Guide to the Microsoft Windows Presentation Foundation (Pro - Developer)

Applications = Code + Markup: A Guide to the Microsoft  Windows  Presentation Foundation (Pro - Developer)
Authors
Charles Petzold
ISBN
0735619573
Published
13 Sep 2006
Purchase online
amazon.com

In this book, Windows programming legend Charles Petzold covers in parallel the two interfaces that make up the Windows Presentation Foundation (WPF). From the outset, the reader can shift focus seamlessly between Extensible Application Markup Language (XAML) and C# to see them as flip sides of the same processes.

Page 2 of 2
  1. Editorial Reviews
  2. Customer Reviews

Customer Reviews

E. McElroy said
When Petzold's original book "Programming Windows" was first published in the mid-80s, THE computer book of the time was "The C Programming Language" by Kernighan and Ritchie. The teaching model of that book was incremental learning through example, always making sure that the reader was not overwhelmed by excessive detail at any particular stage of the learning process. This was the model adopted by Petzold for "Programming Windows" and it was as successful for Windows as it was for popularizing the C language. It is the model that Petzold has continued to follow in subsequent books. I have found this approach, when used by talented writers, to be very effective at producing a good understanding of a complex programming topic. Petzold's book on WPF is no exception.

This is not a book one reads in the living room. Like "The C Programming Language" and Petzold's other books, this is an extended tutorial to be read while sitting at the computer. That's why there are no screen shots in the book: they're on your monitor because that's where you are when you're reading it, at least during the initial reading.

One need only look at the disagreement among reviewers of this book to realize that it's a very different book from the endless mediocre titles offered by computer book publishers. Readers with a long background in software are also likely to realize that the variance in ratings almost certainly occurs because readers approach it with different backgrounds and different expectations.

Any of Petzold's books takes time to go through. That's simply a requirement of a book which teaches by incremental learning through example. Petzold is a very good writer and his explanations are clear but demonstrating fine distinctions frequently means a topic must be developed at length. My opinion is that most people will take months to fully absorb this book and, therefore, this is not the book you want if your boss just gave you a WPF project and wants to see something on the monitor by the end of next week. There are other books that can help you do that much more quickly but those books, at least the ones I've looked at, will not bring you to the level of expertise that this one will.

This book will not be suitable for someone whose background consists of applications whose interface can be constructed by dropping controls on forms - a Petzold book is not intended for that kind of audience. For those who need to learn something quickly about WPF, Adam Nathan's book is quick reading: I went through a third of it in a couple of weeks before switching to Petzold's book. Although I haven't looked at them, someone under severe time pressure might want to check the instruction videos on Microsoft's web site to see if they can be useful.

The bottom line, for me, is this: WPF is a complex subject with a lot of detail and with architectural concepts very different from traditional GUI frameworks. It can easily overwhelm someone trying to learn it, even someone with decades of experience. It takes an enormous amount of intelligence to be able to take such a subject and break it down into incremental steps to make it understandable the way Petzold has done here. If you need a deep understanding of WPF and you are willing to spend the time that this book requires, this is the one you should get.

Chris J. said
1. The book has no pictures. Not one lousy image graces the inside of this book. For a book on XAML which lives and breath's graphics, this is a fatal flaw.
2. Chapter 20 is obtuse enough to make you want to rip out your hair. The chapter is supposed to be about properties and attributes. So what does the chapter talk about for the first 20 pages or so? Some lousy XAML cruncher. Only the last page of the chapter has a useful summary, that really should have been at the beginning.
3. It is long on tutorials code, and explaining the code, and short on explaining the principles that the chapters claim to talk about.
4. He will go out of his way to show you (pages and pages) of odd and useless syntax, that does nothing but confuse and strain the patience of the reader.

Don't buy this book.
Petzold was good once, not anymore.
He should retire to Florida and save us all some grief.

Leon Rogson said
I am still on chapter one, going through the book while coding the examples and learning from them. It is a good thorough description of what you can do with wpf. I'll add to this when I am finished.
Leon

Ryan P. Sommers said
Over the last decade I've been reading books by Charles Petzold; until this one I enjoyed them all. I consider Petzold to be one of the best Windows development authors out there. He's been writing about it since Windows was became Windows. Most of his titles offer well thought out and presented material. This book did not.

Twice I attempted to read this book as my introduction to the Windows Presentation Foundation. Both times I failed to advance my mark more than a few hundred pages. There are absolutely no illustrations, screenshots or pictures of any kind. This fact forces the reader to type up his numerous code samples to see their output. While I enjoy having many samples in a book about programming, I don't always need to type up the program myself to understand its meaning. Call it teaching to all the senses, but I like more visuals.

My other complaint with the book is that while reading it I constantly feel I'm not moving anywhere. Most other programming books I've read I felt like I could go out and use the tool, even if it was only a fraction of its functionality. With this book I constantly felt like I had to wait until the 2nd half, the XAML discussion, to really use WPF. Yes, I could write a GUI by programmatically instantiating all the elements, but that isn't the way the technology was meant to be used. I would have enjoyed a brief introduction to XAML and its use throughout; only waiting until the end for diving into its deepest intricacies.
In the end, I couldn't finish this book and purchased a different title.

Pat Chipdey said
Every book I had read so far on WPF sidestepped the basic premise behind WPF -- that it was a brand new platform and a new programming paradigm, which will eventually replace WinForms. How did they do that? By glorifying XAML and everything that it could do for you, turning Windows programming into that trash called HTML, which most Windows programmers stay away from. When I read Nathan Adams' highly touted book, I couldn't get past that 3rd chapter. Chris Sells? About the same. The problem was always the same -- each of the aforesaid authors unnecessarily burden you with XAML when you are already trying to get your head around the WPF, thereby glossing over some very, very important concepts!

Charlie Petzold is that seasoned veteran that started doing Windows ever since Windows came into existence. He takes a truly novel approach in teaching you about WPF. He starts off by first telling you about WPF in the language you are most familiar with -- C#. He explains all the concepts, all the ideas, all the tenets. All in C#. And then, when you get familiar with all of that, bam! He hits you with XAML. He then starts showing you how you can do all of the things that he showed you in C# -- in XAML. But by this time, you are no longer struggling with the concepts of WPF. You already know what DependencyProperties and RoutedEvents are. You are already aware of virtual trees and logical trees. So now, when you see them represented in XAML, it makes so much more sense. And it's all easier to comprehend.

The simplest analogy I can give is this: remember the time when you started learning calculus in high school? That was a new enough concept, right? Now imagine if you had to learn that in German (or your non-native tongue)! But once you learn all the concepts in English, you could very well proceed in a language you weren't quite as familiar with.

To me this is the only way I could have learned WPF. And XAML. I was pushing off WPF all these days only because XAML was getting in the way of my learning. While a lot of Web-programmers will be happy for XAML, the fact is, declarative programming is not something Windows programmers are used to. To them, the only way to approach the subject is to first teach them WPF and then show them how XAML comes in the picture.

Having said that, there are a two extremely irritating aspects to the book that start rearing their annoying heads by the time you get to the second chapter:
1. There are no graphics showing outputs from the code. Granted you are expected to run the code samples (which can be downloaded from the MS Press support site), but I shouldn't have to run every single code sample. Moreover, there are times when I'm reading the book on a crowded train, when I can't really run the program on my laptop -- there's barely room to open the book as it is.
2. Every program is a Console app. So after you hit the F5 key, the annoying console window gets in the way of viewing the main Window. You have to minimize the window, or move it in order to see the Window (Form). According to Petzold, it's convenient for him to hit Ctrl-C on the Console window to terminate the program. Note to Petzold: Chuck, have you tried hitting Shift-F5 on your IDE? I find this so debilitating that I had a utility converting every single csproj file in the folder tree from a console to a Windows application.

Aside from that, the code samples run perfectly. I'm on Chapter 11, and so far every single code sample works.

If you are a seasoned Windows/C# programmer facing similar mind blocks against XAML, this is the book for you. If you are a Web programmer for whom C# is subservient to VBScript, or JavaScript, and are comfortable with HTML, this may not be the right entry point for you (as evidenced by some of the low ratings that this book got). You may need to get in via XAML, and a book that overly emphasizes its importance (such as Adams or Sells) might be the way to go.

You might also like...

Comments

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“Beware of bugs in the above code; I have only proved it correct, not tried it.” - Donald Knuth