Which interface for a modern application?
HTML 5 , QML, XAML, platforms are emerging, each one with its advantages
and its drawbacks, and the choice is posed since one wants to build a Web
application, a RIA (Rich Internet Application) having the same interface and
the same possibilities that a local application as certain popular sites do
it.
Fear to take the bad way and to spend months under development with an environment
on which one could not lead while an other could have proven to be more adapted
according post in forums where the question is very present.
Things seems even more complicated when one realizes that the various solutions
suggested do not cease evolving/moving and proposing functionalities for now,
and one wonders, will be it possible that in the future, such platform offers
the possibilities currently offered by such other?
JavaScript and HTML 5
The new HTML 5 specification provides a universal interface for Web apps and some desktop apps thanks to the offline feature.
This is complemented by Ajax that is the combination of dynamic HTML (CSS, JavaScript,
DOM plus the XMLHttpRequest object which allows asynchronous interaction between the
browser and the server. And more recently by WebSocket and WebRTC for better interaction with the server or directly with other clients for WebRTC.
Applications uses server-side a scripting language like PHP
or ASP or JavaScript with Node.js.
Advantages
Total portability: recognized by all of recent browsers.
Very wide choice of frameworks.
Compatibility with standards of the Web: Javascript, CSS, Document Object
Model.
Work locally without a connection to a server.
Simplicity of implementation.
Disadvantages
Using CSS for layout is often tedious.
Programming in Javascript may be difficult for large projects.
Evolutions
The evolutions are done through frameworks, increasingly developed and also
in new standards of the Web which are designed to support Web applications. The gradual transition of Node.js to ECMAScript 6 facilitates the realization of large apps.
C# and XAML
XAML is like XUL an XML-based language of description of interface. It provides an interface language for Windows with .NET, on Linux with Mono and systems derived from Linux like Android.
It is used for the graphic interface of
Windows since Vista, and by Windows 8 an 10 both in the new Modern UI/Metro platform or classic destkop with .NET.
Advantages
Very broad library of functions.
Choice of the programming language on the .NET platform.
Disadvantages
Compatibility limited. Requires practically the presence of WPF or WinRT but not on Windows 10 and Core .NET.
Evolutions
Immersive applications on the Modern UI of Windows 10 may use XAML. The open sourcing of .NET could bring a new life to XAML too.
See also: What future for XAML?
Java and JavaFX
The Java solution is complete since it proposes a server-side framework, and with at client-side, on the browser, applets, which are small applications functioning in a Web page. That can also be supplemented by a scripting server-side language, JSP. Let us add to that servlets for Web services and we have a portable and complete platform for enterprise Web applications. JavaFX helps to create user interfaces.
Advantages
Extremely vast library of functions.
Compatibility with all platforms.
Disadvantages
A runtime must be installed on the client-side. For web apps, the server must
support Java what implies practically a dedicated server.
Programming in Java may be complex.
Evolutions
XAMJ, an implementation of XAML in Java could combine the advantages of
the XAML format with the portability of Java but JavaFX is the standard solution to build interfaces.
Qt and QML
Qt was originally a Linux framework for interfaces that has been ported on all operating systems including Android and iOS. It offers all the necessary widgets to build any interface and has also its own interface language, QML, which has a syntax similar to JSON and so is like JavaFX.
Advantages
Portability on desktop and mobile.
Integrated renderer for documents and interfaces based on Chromium.
The Qt Creator development tool facilitates the making of applications.
Disadvantages
The Qt runtime is impressively large (30 Mo at least). But it is the same for Java.
Programming is done in C++ allowing for fast applications but prone to bugs.
Let JavaScript in the interface communicate with C++ on the backend may be complicated.
Evolutions
A mobile operating system, Sailfish, is based solely on Qt. It offers Android compatibility (which has an SDK for C++), and therefore can replace the Dalvik JVM with full portability.
Summary table
The choice of the interface of Web application could be facilitated by using
the following table:
HTML 5 | XAML | Qt |
JavaFX | |
Display in the browser |
yes | no | yes |
no |
Portability on operating systems |
yes | Partial | yes |
yes |
Mobile compatible |
yes |
yes |
yes |
yes |
Performance (reactivity) |
Depending | yes | yes |
yes |
Free of charge |
yes | yes | yes |
Depending |
Too much complexity |
no | no | C++ | Java |
Note that it is possible to combine solutions to solve the deficiencies of a format. For example, Ajax can be used at client-side in conjunction with Java at server-side to avoid the slowness of applets. There are also frameworks that allow to work offline.
Other solutions
The vector graphics SVG language allows to add graphical components to a Web application interface. Vector graphics allows widgets wich resize with the screen, and it is more appropriate for graphics applications and games, on the desktop. Web and mobile applications should not use SVG because the compatibility between browsers is imperfect.