Sunday, December 17, 2006

WTF/E

I'm working on a Windows Sidebar gadget for a friend's website, just out of interest of having that gadget available to myself on Vista. In doing so, I wasn't so happy with the abilities of HTML/Javascript to do what I wanted graphically, so I decided to take a look into WPF (a new feature for Vista).

Turns out that just the other day, Microsoft released their "Flash killer" known as WPF/E. It runs on Mac and Windows without the .NET Framework. Interesting.

Well, I'm having a hell of a time trying to get it to work at all for my needs. I'm having to embed XML in script tags in HTML to get it to show just a black box. And even then, I can't seem to get it to draw an image.

So I went around searching on the MSDN website and came across this thread. I decided to attach one of the posts by "Daryl" to my blog just in case this post or forum ever went away. This guy absolutely hit the nail on the head in every way when it comes to what .NET developers are asking about Microsoft right now. For about 5 years, they've had the technology to put all of these dorky web applications out of business with .NET, and haven't done anything with it. WPF/E seems like they again have missed the mark on what the market really wants.

I'll shut up now and quote Daryl's post. It's excellent. The rest of this post is quoted from Daryl, I didn't write it.

Barak Cohen wrote:

Thanks for this feedback. mini applications is a scenrio we look into. It would help us if you an others will try to drill down in to the scenarios you envision and prioritize you needs from the platform.

It's good to see Microsoft people hanging around public forums and maintaining their own blogs. I'll offer you some free advice, which you didn't ask for: people on the internet will give you brutally honest feedback which your co-workers and subordinates would never dream of. People on the internet don't have to eat lunch with you, they don't have to sit through meetings with you, heck they don't even have to deal with the tiny, uncomfortable moment when you pass in the hallway going opposite directions.

And in that vein...

"Mini applications is a scenario we will look into"? I guess I don't understand what the point of WPF/E was supposed to be. A lot of people (myself included) thought that the whole reason you would port WPF to different platforms was for writing applications, which would then run on those different platforms.

WPF, everywhere. What do we do with WPF? We write applications. With WPF/E, those applications can run everywhere -- even on my mobile device. Simple enough.

Now we get our first look at it, and there are no UI controls? What are we supposed to do with this? It plays some media files, and it has drawing primitives. There is absolutely nothing in the December CTP which Flash hasn't been doing since 1996.

If this is all WPF/E is going to do, you may as well throw it away. Flash has a ten-year head start. It has thousands and thousands of developers. It has full-featured authoring tools available today (including some free ones); it has a UI library (Flex).

So when I hear MS people saying "mini applications is a scenario we will look into", I think to myself "Look into? What the heck have you people been doing since PDC'05? You disappear for 18 months and come back with a simple media player that doesn't even understand mp3's?"

The "scenarios I envision", Barak, are all the same scenarios which people like me have been paid to develop since before .NET 1.0. They're some of the same scenarios people currently use Flash for, despite Flash being a *** to develop with. You know, applications. Chat clients, picture sorters, a check register, that cool thing on my bank's website which lets me create a single-use credit card number, minesweeper, my SSH client...

Applications. The stuff we run on our computers every day. The stuff google tries to imitate using Javascript and DHTML, with limited success. It's hard to code functional applications without things like buttons and menus and drag-and-drop and file dialogs.

This is so obvious I'm having a bit of trouble typing it, but here it is in black and white: Take XAML AND .NET, which are good, and use them to replace HTML AND JAVASCRIPT, which stink. Call the whole thing WPF/E. Is that clear enough? When you browse to a site and instead of getting index.htm you get index.wpfe, your job is done.

I don't just want to embed an island of XAML in my page, I want to use <GridLayout> to layout the whole page because even with CSS, getting HTML to layout and resize intelligently will drive you crazy. And I want the content of that page to be surrounded by <TextFlow> tags instead of <div> tags. Am I being clear?

I think a lot of .NET programmers are honestly a bit perplexed by Microsoft right now. There's this whole new XAML paradigm for coding applications. A declarative UI model -- it's certainly a big shift away from the code-generator approach of Visual Studio 2005.

It's going to take a lot of time and work to learn a whole new way of building applications. I find WPF very interesting, because I'm a geek. But my boss doesn't pay me to find things interesting. As a professional developer, I'm wondering what my return on investment is going to be if I spend all that time learning this new XAML way of writing applications.

Up until a few weeks ago, I had assumed that one payoff was going to be greater reach. I mean, the whole point of creating a markup language for your UI design is that you can push it out over the internet, right? I thought if I learn XAML, I would be getting a native-app language and a browser-app language at the same time.

But lately I've noticed Microsoft talking more and more about AJAX as a cross-platform tool, and meanwhile XAML seems to be rotting on the vine. Case in point: there are about a hundred XAML clocks out there (what is it with XAML and clocks?). Yet not one of them can run in my Vista sidebar, because Microsoft went with HTML and Javascript for gadgets. What's up with that? WPF/E seemed like a brilliant play for Microsoft, but now I'm hearing that the ability to write applications is "something we'll look into"? If it's not for writing applications, what is it for? More clocks?

Make no mistake: Cross-platform application development is coming. If it's not WPF/E, it will be Flex or SVG. People won't settle for anemic, HTML-based applications once there's something better. I'm enough of a C# fan that I hope you guys make something of WPF/E. I'm actually quite intrigued by XAML.

But I can tell you this: When the people at Adobe look at WPF/E in its current state, they smile. And when they see people from Microsoft saying "applications are a scenario we will look into", they laugh out loud. I think you really had them scared for a while.

1 comment:

stelt said...

I think it will be all 3 and more of them, where the open options (that is SVG in your 3) will be the preference of a growing group of people. See everything about SVG on http://svg.startpagina.nl