Cross-platform development is usually understood as mobile app development
(Android, iOS). For example, you may use PhoneGap, Xamarin or Titanium as the platform for your app. Or maybe choose ReactNative or NativeScript, which have been gaining popularity recently. However, operating systems for desktops (Windows, Mac OS, Linux) tend to be unjustly overlooked.
What really matters here is that in many cases businesses require desktop applications. Here we will try to outline advantages and drawbacks of the most common technologies for cross-platform development for desktops. We will consider business needs, functional requirements, and speed of development. We will also illustrate them with examples.
This is the oldest approach to cross-platform software development. Its slogan says, "write once, run anywhere", and that perfectly applies to cross-platform development as a whole. As opposed to other platforms we are going to discuss today (except Haxe), Java has grown as one of the cross-platform programming languages.
• The oldest platform. It has an enormous community, an enormous amount of tools and third-party libraries that solve a rich variety of tasks, with the vast majority focusing on data processing.
• It is easy to find qualified specialists for support.
• Java virtual machine must be present on computers that run the application.
• Versioning. Drastically different versions of virtual machines with different functionality.
• Weak support for GUI. Although this issue is fixed in the latest versions with JavaFX, versioning is still a problem.
• Weak code portability. It is impossible to port code to another platform.
Lots of enterprise systems are built on this platform, and even the famous Minecraft. If you need a big enterprise solution, and it's evident that there are libraries for the required data processing algorithms; if the volume of data is so enormous that you will need multithreading, Java desktop application development might be the answer.
Adobe Integrated Runtime (AIR) is a cross-platform environment created by Adobe. It allows to use HTML/CSS, AJAX, Adobe Flash and Apache Flex for porting Web applications (including Rich Internet Application) to desktops and mobile devices.
• Since for Flash it is the only way to wrap it as a desktop app, all of its advantages are taken over by Adobe AIR (such as animation and vector editor).
• No support for Linux.
• The Adobe AIR bundle has to be installed, unless AIR runtime is embedded in application.
• Limited in-built access to native services (e.g. SQLite and web services).
• This is proprietary software. To correct errors in AIR or add new features it is necessary to make a submission for error correction in Adobe BugBase.
Adobe AIR works best as a platform for desktop development if you already have a Flash application, which is fully or partially intended for desktop use. Another case is when visuals are what matters most in your application, there are Flash-based libraries for your case, and you are planning to use 3D graphics – NWJS or Electron + WebGL might be the best choice.
Take note that the main drawback of both Java and Adobe AIR is the necessity of having an external software suite and its versioning. This in turn makes the end user keep an eye on its availability. The app won't run without it. Add problems with support, since new versions of these suites keep emerging, even the best Adobe AIR apps get obsolete and simply can't launch over time.
It's not quite a platform for cross-platform development. It's rather a multiplatform language compiled for a required platform. It can be any platform mentioned in this review. The drawback here is the necessity of knowing a specific language, the necessity of having a specialist, difficulties by optimization of the compiled code, and all the drawbacks of the target platform, for which Haxe is compiled.
But if you are intent on a long-lasting product, and it must be compiled for several platforms, Haxe is a good choice. One thing you shouldn't forget is that you will possibly need a team of developers, since Haxe is rather young, and for every platform you will have to modify and re-compile the application.
QT allows to create and launch software on the majority of modern operating systems by simple compilation for each OS without modifying the source code. It includes all major classes that may be needed by development of an application – from GUI elements to classes for work with network, databases, and XML.
The main advantages of QT can be seen from its history:
• It's one UI library for all platforms (whether it's an advantage or a drawback, depends on your project).
• Popularity of C++ as a programming language.
• Your developers have to know platform-specific UI libraries. Use of third-party libraries is rather limited.
• The size of the application will be considerable, since all the libraries used in your application are included.
• Relative complexity of distribution of applications for Windows (for free license).
• There may be issues with plugins.
• It is hard to find examples for non-standard cases.
Examples of different apps may be found here
You should consider that QT is much less popular than Java, thus QT should be selected if you have a specific library that is already implemented on C++, and there are no similar tools for other platforms or languages; or if you have C++ developers who can easily switch to this platform.
The main drawback is that CEF gets built in a native application; that is, you need a native developer who will write the native part of your application. This approach is hybrid, rather than cross-platform.
On the other hand it may be called an advantage, because it allows to implement every single needed feature, with maximum flexibility of the resulting software product. We can name a lot of examples based on this technology:
• Adobe Brackets - code editor for the Web
• Adobe Edge - multimedia authoring tool
• AppJS - build desktop applications using Node.js
• AOL Instant Messenger - Windows client that uses CEF
• Cubiez - integrates your favorite content into the desktop
• Desura - online game platform
• Dish World IPTV - streaming video platform
• Evernote - notetaking software
• ExeOutput - allows you to deploy HTML5/PHP applications as desktop applications
• GitHub for Windows - GitHub client software for Windows
• Janetter - Twitter client software
• mChef - mIRC browser plugin
• MediaMan - organizer software
• MetaVR - geographic simulation software
• MTG Studio - game organizer software
• OpenSpace3D - 3D development platform
• Rdio - streaming music platform
• Spotify - streaming music platform
• Steam Client - online game platform
• Tencent QQ - instant messaging program and web browser
• Trend Micro - internet security software
• WBEA Desktop - allows you to deploy HTML5 applications as desktop applications
This is a more sophisticated solution and an advancement over the previous platform
. It is a full-fledged platform for creating cross-platform software for desktops. CEF and Node.js server are used as its basis. This is why a release package contains additional 30 MB, which is probably the only drawback. However, the size of the release package is not that critical.
is one of the latest platforms for desktop cross-platform software development. However, it has already served as the basis for several products, including those of such famous companies as Facebook
As opposed to NWJS, Electron does not contain the Node.js server. It's closer to CEF, but is already a full-fledged platform, so there is no need for native development.
We should also mention Desktop PhoneGap, which is under development by Adobe, but it's still in its alpha version.
• Currently it is extremely hard to find more powerful and convenient layouting & stylization tools than HTML and CSS;
• A big chunk of the application code can be used on other platforms: on Web as a site (SPA), on mobile platforms (PhoneGap). And if NWJS is used, it may be used as a part of the server logic.
Conclusion: so what is the best platform to build cross-platform desktop apps?
The answer is rather obvious: the one that matches your particular product requirements, the one that helps achieve your business goals in the most cost-effective way. Consequently, the best programming language for desktop applications is the one that supports your optimal platform. Otherwise, there is no such notion as universally "best" platform to build your product with.