Desktop apps are back, thanks to the Web !

HTML5 makes sense in Mobile apps. So why not in Desktop too ?

Yacine Rezgui
Dev Rocket

--

Poor desktop. Because of the smartphones, tablets and now the watches, all the studies predict its approaching death. But I think they’re wrong.

Of course, the desktop hasn’t the monopoly anymore, but I still think tablets and smartphones are extra units, of course with a lot of features, but you can’t really work on it. You can write your notes on them, but you’ll always want to finish on your laptop for styling, spelling correction, search easier references, etc.

But I’m not going to talk about desktop usage market share but its new apps. Cross platform apps are the dream of every developer.

Using Eclipse UI system was never a good idea: slow, heavy and ugly

Java was the first try, not that successful unfortunately. There are apps but making a UI with Java is honestly not that easy.

Don’t laugh, it was a sexy UI back in time

Adobe came with AIR, which was a good idea but maybe too early on its time and wrong technologies. The HTML support was good, but only Flash, Flex apps had a deep integration with the system. Plus using an extra plugin was painful for everyone.

But now it’s different

Pocket Chrome packaged app

The first one to innovate was Google with its packaged apps (I need to write an entire post about it). They need Google Chrome to be installed but can run separately. Good point, they work on Chromebooks.

Mozilla Firefox made a similar solution with a deeper integration of the browser, and nice idea, the APIs (not all of them) and manifest are the same as Firefox OS apps

I don’t know about Opera and Internet Explorer, and I will not even talk about Safari (honestly Apple is the new Microsoft in terms of evolving the web). They have extensions, but I don’t think they have a similar feature.

But for different reasons, you might prefer to have a standalone app. There are two ways to do that:

Native webview

Mention app, using native Safari webview in Mac

This solution is limited to Mac & Windows 8. You can have a deep UI integration. In Mac, you have to write some Objective-C for that while Windows 8 has a native HTML5 interface (well done guys !). Your code doesn’t need to have a lot of changes if you already have a unique interface. Otherwise, you can still share the logic between the platforms, which represents the big part of your code.

Chromium Embedded

A database related app that I’m working on using Node-Webkit

This solution is better for a real cross-platform. It uses an embedded Chromium webview, so no need to install Google Chrome. It has a support on Windows, Mac & Linux. There are different implementations, but the most famous one is Node Webkit by Roger Wang.

It’s a special webview, packing NodeJS inside. You can use node modules inside your HTML page! It includes a native UI package too:

 <script>
var nw = require(‘nw.gui’);
var win = nw.Window.get();
var nativeMenuBar = new nw.Menu({ type: ‘menubar’ });
nativeMenuBar.createMacBuiltin(‘Jōto’);
win.menu = nativeMenuBar;
</script>

There are two huge advantages. You can install packages directly from NPM, and you don’t have to write native code to get a UI system integration.

Have a look to Roger’s talk at LXJS conference:

Examples

Have a look to these beautiful apps made with HTML5.
You don’t have an excuse to don’t code your desktop app using another technology anymore ☺.

If you have other examples with screenshot, feel free to write a comment to help me update the list.

Sunrise, the Calendar app that everyone was waiting for !
Aircall VOIP team-oriented app
Slack messaging app
Atom editor from GitHub

--

--

Yacine Rezgui
Dev Rocket

🇫🇷🇹🇳 Developer Relations Engineer 🥑 on Android working on privacy @Google in London. Hacking projects on free time