Years ago Microsoft introduced WPF with its codename Avalon. The dream has been to create a GUI framework that enables users to write an application that can be reused as a webpage. Microsoft did a lot things right with WPF, however, the web part has been outsourced to a technology later known as Silverlight. Now we all know that Silverlight is not only dead, it has also never been as easy to reuse existing WPF as promised.
- Just keep on using Windows Forms, WPF, ... - they won't go away
- Use something like QtWebkit or Webkit.NET or Webkit Sharp to render the app with .NET code behind
There are other options as well, but those are more complicated or not available yet. Now before anyone has some complaints about that list I need to bring up some quick facts:
- Writing any UI with HTML / CSS brings a whole range of advantages in terms of portability
Well, probably it’s time to distinguish here between web applications and using the web stack in an application.
First of all a web application: Here we will run in the browser, i.e. we are basically limited to the APIs that are available in the particular browser where our web app is running. This means that some browsers will give us more than others and some browsers will give us the same stuff but by using a different API. Hence web applications will always be limited compared to real desktop applications, since the browser will never give us more APIs than the underlying OS does.
My preferred solution is to use C# with a proper renderer (i.e. Webkit could be the renderer of choice, but there are other solutions as well). C# is highly portable, since you could also use it or building apps on Android, iOS or Windows Phone, but also for creating a cross-platform application that runs on Linux, Mac and Windows. Additionally we get the static typing, full system access and a set of familiar APIs.
To conclude: Even though there is no silver bullet I would consider the web stack a serious alternative in desktop development. The benefits are obvious and additionally one gains knowledge in a very important sector: developing web applications.