Follow @RoyOsherove on Twitter

Learning new technologies: Is C# a XAML for the CLR?

Oren's way of learning new things seems to be radically different than mine.

Learning WPF, for example.

I currently have 3 books on WPF:

  • Adam Nathan's book (the one with all the pretty colors and XAML examples ("XAMLPES" ?)

 


Windows Presentation Foundation Unleashed (WPF) (Unleashed)


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

 

  • Sells & Anderson's book (haven't read it yet)


Essential Windows Presentation Foundation (WPF) (Microsoft .NET Development Series)

<> 

<>I started Adam Nathan's book and indeed the colors make a lot of difference when trying to understand XAML. However, XAML is not what I'm interested in! XAML for me is just the pretty "uber" coating on top of the APIS. XAML is a static design technique and I'm to create dynamic applications with design that changes and create new controls at runtime, custom controls and so on.  having "just enough" low level to understand why XAML works, is not enough.

<>When I started reading Petzold's book, I got exactly what I need. Sure, the book definitely lacks enough diagrams, but it does a very important thing: it takes you from the basic "Hello World" in WPF upto a full scale application without even mentioning the word "XAML".  Exactly what I needed. The second part of the book is then dedicated to what XAML is. Now that you know how things work, XAML is just a layer of "bureaucracy" on top of that model. Cool.

<>I think that Oren got it wrong when he said:

<>"From Roy's perspective, Adam's book is too high level, not giving all the details that Roy feels he should know in order to be a great WPF developer. I don't agree with that approach, personally. I like Adam's book because it talks about the concepts, and it has just enough low level details so I can grasp the how without getting lost in the details.

From Roy's perspective, Adam's book is too high level, not giving all the details that Roy feels he should know in order to be a great WPF developer. I don't agree with that approach, personally. I like Adam's book because it talks about the concepts, and it has just enough low level details so I can grasp the how without getting lost in the details."

On the contrary. I feel that XAML is too "low level" a detail, that distracts from the high level picture of how WPF actually works. Once you know how it works, all the "little details" like "How would I design this with WPF" become insignificant. because you can translate them from what you already know about the model.

Here's an analogy that fits, I think:

When you start programming in .NET, the language syntax that you use is separate from the abilities of the underlying CLR and base class library. It's just a coating on the really important things that .NET can do. I'm pretty sure Oren would not get a book that is on C# with "Just enough" material on why stuff works underneath, rather than get a book of "CLR under the covers".

To me, C# or VB.NET - they are the XAML of the Common Language runtime and the base class library.

Easier Winform UI Thread Safe Methods with DynamicProxy2 and Osherove.SimpleInterception

NDemo - Demo Driven Development?