The future of GUI

It seems that the discussion about a future proof framework for writing GUI is coming to an end, but one question remains: Why JavaScript?

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.

Lately some WPF / Silverlight developers found a new love with Windows store applications. Others realized, that Windows store applications can also be written with the web stack (HTML5, CSS3, JavaScript), which seems to be more popular anyway. Those people started making a transition. The big discussion is now: Besides those Windows store apps, what should developers do about real (Windows) client applications? In my opinion there are many options:

  • 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
  • Go for a highly portable solution using Node.js with Webkit and JavaScript

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:

  • HTML / CSS is not bound to JavaScript - it's just a description and styling language
  • JavaScript lives (as any higher language) from it's environment / framework, e.g. the browser
  • Writing any UI with HTML / CSS brings a whole range of advantages in terms of portability
  • It's not that "JavaScript is running on every device" but more that "HTML / CSS renders on every device"

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.

Now the use of HTML / CSS as a GUI language. Here we basically have no limitations, since we can access all OS APIs + probably wrapped APIs. This makes the UI quite portable, however, the code will not be as portable depending on the framework and language. Currently the most optimal choice would indeed be using JavaScript with node.js.

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.

Created .


Sharing is caring!