“iPhone 4 is Dead”

Sure, it’s an attention-grabbing title and, of course, it’s complete nonsense.

I was watching the #Silverlight and #WPF tags on Twitter this week and saw a stream of noise about how various client technologies from Microsoft are “dead” and the killer seemed to be a mixture of Flash or HTML5 or even one of the other Microsoft client technologies Winking smile

I spotted a question where someone wrote;

“if WPF is dead then what’s the situation with WinForms?”

which worried me.

People like simple messages. What can you do? I blame the media. Or the schools. Or the parents. Or the government. Or Simon Cowell.

Anyway, this whole “technology X is dead” prompted a few thoughts – these are my own rather than some official Microsoft statement (you may have noticed by now that I don’t make official Microsoft statements).

WinForms Isn’t Dead

WinForms is part of the .NET Framework. When you run Windows Vista or Windows 7 you have WinForms installed along with the operating system. There’s a clearly stated support policy up here for how this works for .NET generally but as of .NET 3.5 Service Pack 1 ( which ships with Windows 7 )  the .NET Framework is supported as a component of Windows.

So, saying WinForms is “dead” is a little like saying Windows 7 is “dead”.

It’s worth saying that WinForms is pretty static and I don’t think it’s controversial to say that it’d be wrong to expect a whole tonne of new functionality to appear in a future version but I’m aware of people building brand new applications on WinForms today because it does exactly what they want it to do.

By the way, I don’t call this “dead” any more than I call the developers building those applications “zombiesWinking smile 

WPF Is Also Not Dead

WPF is part of the .NET Framework so it works the same way.

So, saying that WPF is “dead” is a little like saying Windows 7 is dead.

It’s worth saying that WPF was introduced in .NET Framework 3.0 and has been updated in every version of the .NET Framework since (3.5, 3.5 Sp1, 4.0). Other additions such as the WPF Ribbon control dropped out just the other week.

Having WPF ship in Windows Vista and Windows 7 means an awful lot of the world’s desktops have WPF installed.

Which Lives Longer? iPhone 4 or WinForms?

I’ve no idea what the support policy is for the iPhone 4 but I doubt anyone reasonable expects to be carrying one around in 10 years time so I’ll stick my neck out and say that WinForms and WPF will probably outlive iPhone 4 based on the support policies that are in place for those frameworks.

Yet, no-one is saying “iPhone 4 is dead” and neither am I.

Silverlight – Also Not Dead

Then we have Silverlight. Silverlight has released 4 versions in just 3 years going from nowhere to a penetration rate of around 60% ( riastats.com, not official Microsoft figures ) adding huge amounts of new functionality with each version and gaining some very impressive tooling inside of Visual Studio 2010 and Expression Blend 4.

Naturally, it also has a stated support lifecycle.

So, that’s not dead either.

Silverlight and WPF Have A Lot Of Overlap

Some people have been talking about “Silverlight versus WPF” and how there might be a war where one might eat the other because they look “very similar” Winking smile

this similarity is what I would largely describe as “a good thing” as it provides great re-use for skills

As far as I know, there’s not likely to be a war between Silverlight and WPF because it’s pretty much the same people working on both frameworks – I talked to Ian Ellison Taylor about this on Channel 9 in this chat many moons ago.

But these frameworks are going to converge in the future and Pete Brown explained the strategy for WPF/Silverlight around 6 months ago which I quote here as;

“In the future, it is very likely that both Silverlight and WPF will be a single technology with a single codebase. After all, Silverlight was originally known as WPF/E (E as in Everywhere), and in an amazing 180 degree reversal of our usual approach, we took an ugly codename and created a great product name (Silverlight) from it.”

and so that’s the stated plan as to how these frameworks will eventually go forward and that does not mean that you’re at risk if you choose one of them today – as Pete states;

“Microsoft is committed both to creating a great cross-platform experience, as well as ensuring that there’s a developer platform that can take full advantage of everything Windows has to offer.

Build for the requirements you have today and understand that there will be a path to the future regardless of whether you picked WPF or Silverlight.”

Clearly there are some things to figure out there that are going to take some time but the fact that the technologies overlap doesn’t mean much more than just that.

But Investment in Web Standards Must Kill Something? Surely? Someone Said So On Twitter?

Some people have been talking about “Silverlight versus HTML5” or possibly even “Silverlight versus Flash versus WPF versus HTML5” – that one sounds like a tag-team match.

as an aside, I wish “HTML5” hadn’t become a moniker for a whole bunch of web standards (e.g. CSS3) as I think it really blurs the picture

Microsoft’s making huge investments in implementing a bunch of web standards in IE9 and I think that’s very exciting and so is the way in which they’re being implemented. The feedback on the platform previews is extremely positive and I suspect the beta will only reinforce that when it comes along next week.

However, as the Silverlight team talked about just last week, that doesn’t mean that Silverlight is suddenly “dead” or WPF is suddenly “dead” or Windows applications are suddenly “dead” or Phone applications are suddenly “dead”.

It means that IE9 is going to be a great version of the browser and one that a lot of web developers have been hoping would arrive.

It means that it all depends on what you want to build and when and how you want to build it.

Same as it ever was.

It Depends On What You Want To Build And When And How You Want To Build It

If you want to build a Windows 7 application today with deep integration into the platform for features such as;

  • Multi-touch
  • Multi-core
  • Event log integration
  • WMI integration
  • Performance counter integration
  • Shell integration ( e.g. JumpLists, TaskBar, Preview Handlers )
  • Automatic startup
  • System Tray integration
  • Running components as a background service
  • Office integration
  • Custom hardware integration (ports etc)
  • Speech
  • 3D Graphics
  • Workflow Engine
  • Direct access to a database
  • etc – we could go on practically for ever here as Windows is a pretty big platform

then I’d recommend the full .NET Framework and a UI constructed in WPF. You get an awful lot in the full .NET Framework that you can make use of inside of a WPF application.

You might want to look at applications like MetroTwit which are brand new apps running on WPF and making for a very good user experience ( in my opinion ).

If you’re looking more towards building a Rich Internet Application – something that follows the “web deployment” model of dropping some bits on a server and pointing the user at a URL and that largely calls out to web services and/or you want cross-platform then I’d look to Silverlight and especially if you’re a .NET programmer as you get a very good “sweet spot” between the simplicity and cross-platform nature of the web and the richness of “the desktop” including functionality like;

  • Consistent experience cross-browser and cross-platform including OS X, Windows and including IE6, 7, 8, 9, FireFox, Safari and Chrome.
  • Rich set of controls that can be styled, themed and extended
  • Rich 2D graphics engine
  • Rich animation capabilities
  • Rich text
  • Printing
  • Full-screen
  • Rich media (audio, video, imaging) capabilities
  • (Scoped) network capabilities
  • (Scoped) access to integrate with other software on the local operating system
  • (Scoped) access to storage on the local operating system
  • Rich tooling in Visual Studio 2010 and Expression Blend 4
  • Multi-core
  • etc.

and, of course, this is (very largely) a subset of what you can do in the WPF framework and, furthermore, you’re using the same languages, runtimes, tools, frameworks.

If you want to build a Windows Phone 7 application then look to Silverlight and XNA and, luckily, once again this makes use of those same languages, runtimes, tools, frameworks.

If you want to build a standards-based web application then look to server-side frameworks like ASP.NET Web Forms and ASP.NET MVC and supplement them with libraries like jQuery which Visual Studio 2010 has great support for.

Keep a close eye on developing web standards as they move along to see what they are going to offer and how they are getting implemented in IE9 and the other major browsers out there so you can figure out what functionality your apps are going to be able to exploit consistently across browsers and platforms (the “single markup” story of IE9).

And the last one – if you’re wanting to build a cross-platform, cross-browser, cross-device application that is entirely standards based but also integrates deeply with the operating system and hardware and makes use of the GPU and all the CPUs and is highly performant and offers the richest experience and has a fantastic set of developer and designer tools and is based on a component-oriented, metadata-rich, multi-language capable runtime and framework which is already deployed to 100% of your user community and can run on the desktop and be deployed in the browser and has great access to online and offline services and is future proofed for all time Winking smile

Then you don’t need a compiler.

You need a crystal ball Winking smile 

Step this way…..