Windows Presentation Foundation is one of the most interesting new developments in .NET 3.0, we sat down with WPF trainer and author Ian Griffiths to talk WPF, Silverlight and what Microsoft has over the competition.

Are we going to see the new browser wars in the Platform wars fought between the big guns of the software industry?

It certainly looks like everyone is gearing up for that. Adobe is certainly not letting this walk past them while they’re asleep. They obviously have a very well established position, given Flash, arguably they’re in a better position than Microsoft to expand on what you can do in this space since they’re already there. I mean, Microsoft’s got Silverlight, but not on anything like the number of desktops that Flash is, and probably wont be for a considerable time to come. Of course Microsoft wants to control everything they can, being in the platform industry that’s what they do, the more desktops they can reach the better for them.

…it’s not really clear how it’s going to go, but I think there may be trouble ahead.

On the coming platform wars.

So you’ve got these two behemoths both competing for exactly the same space. And then of course you’ve got Google who are coming into this world with AJAX from a different kind of angle but with the same overall sort of ideas, but they’ve got a radically different distribution model and business model, so it’s not even really clear how it’s going to pan out, because you’ve got all these companies that have all got on your desktop through completely different routes, but they’re all very powerful. So I think it’ll be interesting times to look back on and see how it all panned out, it’s not really clear how it’s going to go, but I think there may be trouble ahead.

Do you think that Microsoft’s control of the dominant operating system and web browser gives them a big head start?

Well yeah I think that has to be a huge advantage, but there are a few qualifications on that. One of which is that they can’t just wield that power freely, otherwise people will cry foul and the courts will come down on them again. They have some form there as the U.S. court system and the E.U. court system lately has been demonstrating that it’s very easy to whack Microsoft on the head given the slightest opportunity. So if Microsoft were to announce tomorrow that they were going to distribute Silverlight via Windows Update they just wouldn’t be allowed to do that, that would just be stopped before it got off the ground. And Microsoft know that, they have to think very carefully about the balance between the power they have versus how they can take advantage of that power without being seen as abusing their monopoly position, because they still have that monopoly position.

I think that’s actually an advantage that Google and Adobe have in this space. Google may be dominant, but they’re not a monopoly in the sense that it’s pretty easy to change search engines, and they’re the classic example of that, they were nowhere when they first appeared and then just completely wiped all the other players out. Adobe, I think, are in a similiar kind of position because no one really thinks of them as monopolists, although I think the Flash platform is an interesting one there, what would happen if someone launched an anti trust suit on them on that basis? When you start looking into details maybe theres a case there, I’m not a lawyer so I don’t know how these things work, but I wouldn’t rule it out as a risk of being seen as exploiting a dominant position if I were Adobe.

Do you think the trend is going to be for desktop applications to gradually move towards being Internet applications, or for Internet applications to move to the desktop?

It’s an interesting question, some people just absolutely believe that the Internet has won and it’s just a question of gradually, incrementally giving it the benefits the desktop has to offer. Paul Graham, quite a well known venture capitalist and writes regularly, recently posted an article where he says the Microsoft is dead. Not financially of course, they’ll carry on for donkeys years just like IBM did, but he reckons they’re no longer technically relevant because he thinks the web’s where its at. And of course he would say that because he’s got a lot to gain from Web 2.0 investments [that] he personally has made. I find it very hard to really judge this, because I come very much from a background of both rich client development and also broadcast media – digital television was my background before I got into computing. So I’m quite fussy about the quality of the visuals, and I look at the Web and see how rubbish it seems to me in terms of the quality of the appearance and the quality of the interaction, it just sort of seems to be that it’s barely usable.

It just sort of seems to be that it’s barely usable.

On the Web as an application platform

So for instance in that Paul Graham article he says that desktop applications are all being superseded by web apps, even Photoshop. I thought… “really?” so I clicked on the link to this online photo editing thing, thinking I’ve got to try this and see what it’s like. The first thing I try to do is crop this image from my digital camera, and when I finish uploading this enormous great image to the website, I can start to use it and i can pretty much tell you it’s not exactly an improvement on the free copy of Photoshop elements that came with my camera. Okay, so what can I do? I can crop, resize and use their one click enhance that does something indeterminable to my image. Now that for me is not a replacement for Photoshop, so for example I couldn’t have done the same things that I want to do to that image, like remove fingerprints from the lens, that’s a common problem for me and you just can’t do things like that with this, it didn’t seem to give you any control over brightness and contrast and things.

The big problem though was that it was unusably slow, just because the huge amount of data getting over the Internet and back was a problem. Now maybe ten years from now we’ll all have two hundred megabit connections and that will be less of an issue but today that seems to be the biggest disadvantage of the web. Also theres the latency, bandwidth will get better, but latency never will, you can’t just move Sydney and London closer together so there’s always going to be a certain delay there, and that’s going to rule out certain kinds of things.

Having said that I’m coming from the point of view where I want everything to be perfect. In broadcast video if you’re sending stuff out to millions of people you pretty much have to do as well as you can or you shouldn’t be working in that industry — whereas on desktop PCs people have always put up with slightly shabby presentations to be perfectly honest. It’s easy to demonstrate that you don’t need to be perfect, the interesting question for me is can the web get close enough to being good enough for most people, can the benefits that the desktop has to offer cease to matter for anyone except for geeks like me? I have to think that that’s the billion dollar question.

Maybe they can, certainly for some kinds of applications they probably already have, I know people that claim to prefer Gmail to Outlook. For me that’s not going to work because I spend a lot of my time flying, I go all over the world and Gmail wont work on an airplane. And so for that kind of thing if you’re partially connected, drifting in and out of connectivity, then the web doesn’t really have an answer for that. You’ve got to have a certain amount of stuff on the client side to be able to do that well, and for certain kinds of applications that means you need a lot of things, I’ve got about a gigabyte and a half of data which is my mailbox that follows me around and synchronises up with whats on the other side, but unless you’ve got permanent connectivity I don’t see a good solution for that in the web space.

It seems to sort of come back to these big bodies of data, it’s nice that I can have them up on the web somewhere so I don’t have to rely on this two a half inch platter of easily breakable hard disk in my laptop not to fail. I love the fact that with my email I can reformat my hard disk, reinstall windows and my mailbox reappears because the master copy lives somewhere else. That sort of thing’s great, but that’s not really a web vs desktop thing, you can do that on you own. It’s got to the point that both kind of application are taking the best of what the other can do and putting it together in one. So it’s really a question of does the desktop have enough benefits to offer that the web just can’t quite catch up? I don’t know how to answer that one.

fundamental problems that no amount of technology can overcome, unless we fix the speed of light.

On shortcomings of web applications

For me personally there are too many shortcomings of web applications that seem to be tied to fundamental problems that no amount of technology can overcome, unless we fix the speed of light somehow. And even the ones that are potentially fixable are not going to be fixed for quite a long time, the bandwidth issue is going to be a relatively slow process, particularly if we upgrade so that everyones got enough to do video. What’s going to be the next driver to upgrade further from there? Unless there’s something specifically driving investment then maybe we just decide that ten megs is enough for everyone and that will just put a limit on which kind of applications that can run where.

It’s very hard to know. It’s famously difficult to predict this kind of thing. For me personally I’ll always find the web irritating because I’m touchy about the kinds of thing it can’t do, but it would not entirely surprise me to find that I’m in a minority there.

You’ve been talking to software developers during training recently, what are the most popular questions you’ve been asked?

Should I be using WPF? I mean a lot of people who come on the course at the moment are trying to decide if now is the time to switch, because it’s often quite hard to tell that without being used to the technology. Also people are interested in strategies surrounding Silverlight, where exactly are Microsoft going with that. People want to be able to build the one page that works like a website, but is also the kind of uber slick multimedia experience on the desktop. That still hasn’t happened and I still don’t see a path through which that will happen, but theres a lot of demand for it. For Microsoft thats an area that they will continue to plug away on because they know people want that, the closer they can get to delivering it the more that will happen. So there’s a lot of interest in that whole area, the convergence of coming from the web and rich clients and things coming closer together. Those are the big two I would say, anything else is a bit lost in the noise.

So is now the right time to switch?

It entirely depends on what you are doing. If you have an application that would seriously benefit, say you wouldn’t be able to build it without WPF, then yes, absolutely. If you’re building a line of business data entry application then no, I would say, because right now the tool support is not done. There are no officially supported tools from Microsoft released yet for doing interactive design of WPF applications, it’s all XAML – you’ve got to type up the markup by hand or use tools that haven’t shipped yet. The blend tool side of things is actually getting pretty close, that’s going to ship any week now, or any month now at the latest — I’m expecting that to ship pretty soon because it looks ready to me. Once that’s there it will make things a lot better, because even though its aimed as a designer tool, and it very much is designer oriented — developers can feel a bit out of place with it, it’s better than nothing. You can use it as a developer, and once you get used to the non-developer quirks then it really is a lot faster than writing the XAML by hand.

If you’re already in the Windows Forms world and you’re doing ongoing development I think now is not the time to switch

On moving to WPF.

Visual Studio is a bit further behind, they just released beta 1 of Orcas, so that’s not here yet, and that’s going to be the first version where they will officially support WPF. I don’t think personally that it’s going to be all that rich a design time experience, simply because they’re going to want to get something useful out the door as quickly as possible rather than making us wait another couple of years whilst they get the WPF designer to end all WPF designers. I think we’re going to see a solid step forward that gives us something much better than where we are today, but I’m not expecting to get feature parity with where Windows Forms already is, I think that will take at least one more release to get to that point.

So if you’re already in the Windows Forms world and you’re doing ongoing development I think now is not the time to switch, since you’ll be taking a step backward — and doing line of business apps you’re not going to have any of the benefits that WPF provides, with the possible exception of data binding. WPF’s data binding is a whole lot better than Windows Forms, and I know some people have actually moved over the WPF for that reason alone, and some people are doing hybrid apps that are mostly Windows Forms with bits of WPF in the middle just so they can use WPF data binding. That’s a hard place to be because you have to find developers who are happy with work with both, and that’s expensive, but it is technically workable.

The tricky one is people who are building applications that are not just simple data entry, they’ve got a bit of graphical work going on, and maybe stand to benefit from WPF, but could be done in Windows Forms as well. I say there it all depends on where you are in your product lifecycle, if you’ve got legs in an existing product that’s been on the market for years it’s probably not yet the time to switch but you should probably be looking at what the migration strategy should be. If on the other hand it’s got to the point where you’re planning a whole new product or a major revision then it’s a good idea to think about WPF.

If you’re looking to go .NET now with new development it’s actually a hard decision to make. If you go WPF you are going to have to put up with the fact that the tools are not finished yet, even when Orcas does ship you’re going to have to deal with tools that are not as fully developed as the fourth release of Windows Forms. But do you really want to commit to Windows Forms if you’re starting something with a five to ten year strategic lifetime? A lot of companies are looking at that and saying that it doesn’t look like the time to buy into Windows Forms with new development. Windows Forms does what it does very well, but I think we’ve probably seen that most of the new stuff that’s going to happen with Windows Forms has happened and it will continue to be maintained and a few new things will emerge, just like it did for MFC, but I don’t think it’s going to be where the major new action is going to occur.

So for me, starting a fresh green field Windows Form development now seems a slightly risky strategy, since you’re tying yourself into what’s going to be the old platform before too long. Quite a few people who are coming on courses that I’m doing are from companies that have looked at it and made that decision. They are saying to us, we know it’s a bit too early to switch over but we have to move now because of what our company is doing and we’d rather move to WPF because that seems to have a much longer future in it for new feature development than Windows Forms does. It’s a hard decision, and I wouldn’t want to be responsible for making that decision right now because there’s a great deal worth having from Windows Forms, I don’t want to write it off: It works very well, it’s very usable and it will be very powerful for many, many years to come but now’s a hard time during this transition period.