The Story Begins

In which our intre­pid (or is that tepid?) Hero finds him­self on the shores of the Sharp Sea look­ing through the Windows to the Presentation of the Foundation of all things.

Last time I men­tioned that I was work­ing on a project to sim­pli­fy con­fig­ur­ing our main prod­uct and that I decid­ed to make it a reg­u­lar Windows appli­ca­tion instead of a (shud­der) VBA application.

I like learn­ing com­put­er lan­guages and so I thought that this would be a good time to learn C#. I had dab­bled with it over the years and had writ­ten some small pro­grams in it, but noth­ing serious–nothing that required learn­ing the details or the dark recess­es of a lan­guage. And with 3.0 out I fig­ured I could learn about all the cool new fea­tures. That and I just can’t bring myself to use Visual Basic. It is a pow­er­ful lan­guage with some neat fea­tures but it just brings up too many old, painful mem­o­ries.1

So I fired up Visual Studio and told it to cre­ate a new Windows Forms Application.

Hey, what’s that WPF Application template?

Oh, that is Microsoft’s lat­est attempt to make a good UI library. It’s just anoth­er rework­ing of their old stuff. Don’t wor­ry about it.

Shouldn’t we at least look at it and see if it’s any bet­ter? I mean learn­ing some­thing new is fun and it’s one of the rea­sons were doing this on the side.

No, we know some­thing about how Forms work and we don’t have the time to learn a com­plete­ly new sys­tem if we want to show some­thing soon to con­vince peo­ple not go the VBA route. Don’t wor­ry it will all be fine.

OK, if you say so… 

Talking to my inner self can be annoy­ing. Where was I? Oh yeah, the appli­ca­tion solu­tion was cre­at­ed. Add a few sup­port projects, steal code from oth­er projects, rename a few things, and com­pile. Yay it runs!

Time pass­es…

Microsoft annoys me.

You talk­ing to me?

Yeah. They’re real­ly big, have very tal­ent­ed peo­ple and they still cre­ate com­plex, hard-​to-​use stuff like this. It’s a real pain to get things on the win­dow, look­ing nice, and be func­tion­al. You have to write so much code. Ugh.

You know, there is the thing I heard about once…I’m think it was called WPF. Someone once said we should look at it. I can’t remem­ber who…

OK, OK. I get the mes­sage. Just to make you hap­py I’ll take a quick look, you’ll see that it’s just the same old stuff repack­age like always and we can get back to mak­ing this work.

Thanks, this will be fun… 

Fire up a new solu­tion, this time a WPF Application. Looks pret­ty much the same, an emp­ty win­dow. OK, the tool on the left look pret­ty much the same, maybe one or two new things. Nothing sur­pris­ing there. I guess it time to read up on this. I’ll give it an hour or so.

Time pass­es…

OMG, this is even more com­pli­cat­ed than Forms! Look at all the options and settings!

Time pass­es…

Wait, bind­ing? Like Adobe Flex? We liked bind­ing in Flex.

Time pass­es…

Item tem­plates? Data tem­plates? What?

Time pass­es…

I’ve got it! I get it! Wait! Microsoft made this? This is…good. This is…right!

I told you we should look at it.

But it was just anoth­er “Microsoft threw too many peo­ple at the prob­lem” thing. How could I have known?

You should lis­ten to me more you know. This half the brain has good ideas too you know. 

The Recap

For those try­ing to keep track, I, like many oth­ers, do not have the most favor­able opin­ion of Microsoft prod­ucts. I do have a lot of respect for the peo­ple who work for Microsoft. Some of the bright­est stars of my field (soft­ware devel­op­ment) work for them. But in my opin­ion, the com­pa­ny some­how man­ages to infect them and caus­es them to pro­duce things that are, shall we say, not so good. I think that it may have some­thing to do with bureau­cra­cy and iner­tia, but what­ev­er the rea­son, I am not a fan of most of the prod­ucts that have come out of Microsoft for the last few years (many years in fact).

But WPF changes all of that. Now mind you, it is not per­fect. There are some things I would change but over­all this is how a win­dow sys­tem should be. The sep­a­ra­tion of con­cerns, the sim­plic­i­ty of exe­cu­tion (once you get over the “how does it work” hump), and the abil­i­ty to change just about every­thing is fan­tas­tic. As time goes on and I learn about new fea­tures in the sys­tem I go “wow that’s great. I wish I had known about that before.”

And the great thing about this is that it works as a Windows appli­ca­tion and a brows­er appli­ca­tion. And with Silverlight using the same basic tech­nol­o­gy I see great pos­si­bil­i­ties ahead.


  1. The new Visual Studio 2010 is going to include F# as a stan­dard lan­guage. Finally a func­tion­al lan­guage may become main­stream. I miss Scheme. 

Leave a Reply