Thursday, 19 April 2012

A rant from a confused Windows developer

I started developing for Windows with version 1.02 and back then it was easy. Not easy to develop, as it took days just to create a nice looking dialog box, but easy to decide on the approach to take. You bought the Windows SDK with Microsoft’s C compiler and developed in C, as there wasn’t anything else.

C became C++ and that was the obvious path to follow. Visual Basic appeared, and that was better for some kinds of application. It was fairly easy to know when to use one, the other, or both in combination. Java was great, but didn’t work out as a Windows desktop solution because of politics, and then .Net came along which gave us C#, a near-perfect evolution from C++ and Java, as well as a re-crafted Visual Basic with all the shortcomings removed. The choice of language became a ‘lifestyle’ issue as they were interchangeable, and choosing an application approach was easy - Windows Forms for the desktop and ASP.Net for the web.

Then in 2008 we got Windows Presentation Foundation (WPF) which was radically different. Its benefits and evolution were obvious, and although it had a much steeper learning curve than Windows Forms, once I got over that I was an instant addict. The development community were not instantly impressed though, and I found very little appetite for training in it at first - not helped by the fact that the development tools weren’t really ready until the service pack for VS2008 came out. I was once again comfortable that the standard approach for desktop development was clear - WPF together with C# or VB.

Then there was Silverlight. Originally something programmed using JavaScript for the web, it became something you could use with C# ‘out of browser’. I found my customers wondering whether to use WPF or Silverlight for their desktop applications. It should have been very easy - WPF being the whole package, Silverlight a true subset of WPF, but it wasn’t like that. There were coding differences, similar features being added to both which were incompatible with each other, almost as though they were competing products from different companies wishing to outdo each other.

Next there was Windows phone 7. I got myself one of these, which like most things mobile-phone was much more expensive than I had thought (what exactly is a ‘smartphone bolt-on’ anyway?). I could code for it in C# which was nice and use Silverlight, which was fine in theory, except it wasn’t the same Silverlight. And it wasn’t the same framework, with all the things I wanted to use for my first applications being missing (TcpClient comes to mind). Many things were missing because of security and sandboxing, which I could understand to a point, but many were missing because it was a ‘resource limited device’. My phone has 60 times more memory than the first system I used Windows NT on, so not being able to do the things that Windows NT could is silly.

And now there’s Windows 8. It gains a touch screen interface, so that should have been easy - add some new features to .Net and WPF and we can develop WPF applications in the way we know and love and gain touch. But no - it would seem that it has to evolve from Windows Phone, but be different still from that, with features that are just about acceptable when developing for a phone but nonsensical for the desktop. Just like Silverlight, many things seem to be different to ‘classic’ .Net for no good reason. It feels like it was designed to be programmed in HTML and JavaScript, with something similar to .Net tagged on as an afterthought for C# developers. Now I love JavaScript, but only when I’m writing web page code - elsewhere it is just sloppy and error-prone compared to a real language.

The sad thing is that for the first time since my love-at-first-sight relationship with Windows I’m wondering if I can be bothered. The frustrations of hitting things which are different for no good reason mean that I’m starting to look elsewhere. I’ve always developed for Linux as well, but I’m starting to imagine a world where everyone really does start installing Ubuntu for free rather than buying Windows, and someone gets round to finishing Open Office. I’ve started writing for Android - yes the Java environment has been more of a mess than anything in the Windows world but it’s still a nice language.

No doubt I’ll end up loving WinRT in the end, but it feels strange to be considering alternatives to Windows after all these years. One thing is easy - I’m definitely not an Apple fan. Unless of course they decide that C# + WPF + real .Net is their development environment of choice!