May 13 2015
by Michael Bethencourt
As a web developer, jumping into desktop application development is a daunting task. Native toolkits seem lackluster in terms of control and speed of development, compared with the incredible flexibility of HTML and CSS. Furthermore, web apps have evolved to replace many desktop apps, but there is still a usability gap. Native apps simply have the home team advantage in terms of desktop integration and feature capabilities. Also, if you already have a web app built, but want to improve engagement with a desktop presence, maintaining a parallel native application is prohibitively time-consuming. How about we have the best of both worlds, with native desktop apps that are built with web technology?
Enter Chromium CEF. Chromium CEF is the open source, embeddable version of the Chrome browser, and has existed for nearly as long as the browser itself. This enabled the browser to be fairly easily embedded with languages like C++ or Python. However, no complete, cross-platform solution existed, and the build and dev process still resembled native desktop app development.
Compared to developing truly native apps, web-tech desktop apps do have a few drawbacks.
The most notable is look-and-feel. All of the platforms discussed above have an assortment of desktop-integration features, but will still stand out compared to natively-developed apps.
Another drawback is memory and CPU usage. Web browsers embody a kitchen-sink approach to functionality. Chances are, you will only be using 50% of the huge feature list that the web supports, such as native video, audio, 3D gaming capabilities, and legacy support for dozens. With these frameworks, it's all or nothing, which means an equivalent app written with native toolkits is going to be much lighter-weight.
Finally, the distribution size itself. These frameworks usually sit at least at 30-50 Mb. Native apps can be as much as 10-1000 times smaller, since they use shared system libraries. While for larger apps this is not an issue, if you need to distribute a simple, smaller application, its better to use native toolkits.
Obviously, if you want to port a web app to the desktop, using one of these frameworks is the way to go. It's what Slack did, for example. Building a desktop app from the ground up is far more costly, and requires much more complicated maintenance patterns.
For building native desktop apps from scratch, the decision is a bit murkier. If small size and integrated look-and-feel is essential, and you don't mind putting in a bit more sweat to make it cross-platform, then you probably should stick with native toolkits. However, if you or your team is more comfortable with web technologies, or if the application will require a lot of the same features provided by a web browser (easily re-flowable text, powerful text and layout options such as embedded video, and so on), then I'd highly recommend choosing one of these node.js-based frameworks. For web programmers, development for the desktop has never been easier!
Want more? Head back to the Tivix blog