Few assumptions are safe in the IT industry. A few years back, it was obvious that that PCs running Windows were beating the Apple Mac into a tiny niche. Things look different now. If you planned your IT strategy on the earlier assumption and have not changed, you are now getting it wrong.
In consequence, the extent of mobile browsing was small and mainly focused on niche areas like travel.
It all changed with the iPhone. Those contracts are expensive, but once you buy in you generally get an unlimited data connection, and more important, a decent browser which is a version of Safari, built with WebKit. That same engine is now used in many other devices, not least those running Google Android. Suddenly, users do want to use their mobiles to browse the web; and they will be hitting your web site or application and trying to use it.
Check your stats. I run another blog at itwriting.com, and when a reader complained about its appearance on a mobile, I added a wordpress plugin which both fixes the layout and reports the traffic. According to the plugin, 5% of the traffic was from mobile users. Once the site was fixed, the figure grew dramatically, to over 15%.
A tech news blog is just the sort of thing that appeals to mobile users, so those figures will not apply in every case. The point though is this: all those assumptions about limited mobile usage which once seemed safe now no longer apply.
Here's another line I often hear. There's no need to optimise your site for mobile, since the more advanced mobile browsers work fine with normal web sites.
Unfortunately that is not the case. They work much better than older ones, true. However, the displays are very much smaller and the connection speed often much slower than on the desktop. If you want your site to be a pleasant experience for mobile users, you will likely have to deliver customised content for them.
Does everyone get this anyway? If you have a few spare minutes, head over to mobiReady and try out a few sites; or download the Android emulator; or of course use a real device to test sites that you are involved in or interested in. I did so before writing this piece, discovering that the web still looks very broken once you go beyond the top sites.
The positive spin on this is that optimising for mobile can be a relatively easy way to gain commercial advantage.
Talking of safe assumptions, one that seems good right now is that the number of web-connected mobile devices is going to grow rapidly in the coming years. Optimising for mobile was always the right thing to do. Now it is essential.
So you need a new Windows application. You fire up Visual Studio, but which project type do you select? Windows Forms application, or WPF application?
Windows Presentation Foundation was introduced at the same time as Windows Vista, with final code released in November 2006 as part of .NET Framework 3.0. It was designed to replace existing Windows graphics APIs such as GDI and GDI+ with a more powerful, flexible and scaleable framework for buiding a graphical user interface, taking advantage of DirectX hardware acceleration and rich graphical effects. If Vista had proceeeded as originally planned, it would probably have been deeply baked into Windows itself, but in the end took a lesser role, presumably for performance reasons. Microsoft also added Windows XP support to make WPF more attractive to developers.
Another goal was to improve designer/developer workflow. WPF uses XAML, a declarative XML language, and is amenable to manipulation through a visual design tool. Microsoft released Expression Blend and Expression Design, which export XAML, as well as supporting WPF in Visual Studio.
Developing a Windows GUI can be frustrating. If you have ever wrestled with dialog units or the impact of "small" vs "large" fonts, you will know how badly scaling is handled. WPF is a huge improvement, with sensible layout management as well as great support for multimedia and effects.
Nevertheless, WPF was slow to take off. Issues included the large memory footprint of a WPF application, deployment of the latest .NET runtime, and lack of pre-built components; in fact, for a long time Microsoft itself advised against using WPF for line of business applications.
There was another factor too. Long-term Microsoft platform users have learned to be cautious about any technology that is not much used within Microsoft itself. WPF was a great example, with little obvious use beyond the Expression tools themselves. In this context, it was fascinating the hear the talk from Principal Software Engineer Paul Harrington at PDC in November, about how Visual Studio 2010 has been rebuilt with WPF. Harrington's team has an advantage over most of us, in that they can press the WPF team to fix bugs and make changes, and that is exactly what happened. Visual Studio needed to use invisible windows for some operations; WPF did not support that, but now now in version 4.0 it does. The text rendering in the new editor was making some developers feel physically ill, apparently, because of its blurry appearance on some systems, so a new text stack was built, enabled by turning off ClearType. The Visual Studio team ran into problems with focus and activation, and new modes have now been added to WPF to fix them.
My guess is that the stress-testing of the Visual Studio team combined with other improvements in WPF, such as new business-oriented components, will make it the sensible choice for a Windows GUI application, other things being equal (which they never are), once Visual Studio 2010 is released.
The big caveat is that developing new applications using a Windows-only API does not look like a smart choice in many scenarios, though it could still make sense within some organisations, or if your application is strongly hooked into Windows anyway. WPF has good support for new Windows 7 features, for example. But Microsoft is also releasing Silverlight 4.0, which has considerable compatibility with WPF but runs on the Mac as well as on Windows, is easier to deploy, and which fits with the web model for data handling. Silverlight 4.0 now has COM support on Windows, when run out of the browser, which means you can add native code if you really need to, and integrate with other applications such as Microsoft Office.
In some curious way then, WPF is maturing to become an excellent development framework at just the wrong moment. Nevertheless, I'd now think twice before hitting the Windows Forms option on a new application.