Video: Qt 4.6 running on Nokia’s N900; this is what Nokia is betting on

Nokia currently has three operating systems: S40, Symbian and Maemo. I know S30 still exists for ultra low end fones, but forget about that for a second. If you’re a developer looking at creating a native application, you’re going to have to write three different applications. Nokia wants to make your life easier, and the first step at inching towards that goal was purchasing Trolltech in January 2008. Trolltech makes a runtime called Qt. WTF is a runtime? Take Adobe Flash for example. That is a runtime that runs as a plugin in web browsers. It doesn’t matter if you use Windows, Mac or Linux on your computer, or if you use Firefox, Internet Explorer, Chrome or Safari as your web browser, Adobe Flash content will look the same across all platforms. Qt is the same thing, but the one thing that separates it from Adobe’s Flash, Microsoft’s Silverlight and everything else is the fact that it’s open source.

Nokia is going to be slapping a Qt layer on top of all their operating systems so that developers in the future will hopefully have to write only one version of their application, and then it will run across multiple devices. The ultimate goal here is that Qt applications will run on not only Nokia devices, but Windows Mobile, Google Android, and other mobile operating systems. Below is a video of Qt 4.6 running on a Nokia N900. It’s a beta release, with final code expected to ship some time in Q1 next year.

Nokia’s vision will be very difficult to achieve, and frankly I’ve already decided that the horse I’m going to bet on is the open web (HTML5, CSS, JS) rather than than a runtime that has to be ported across multiple platforms, but hey, good luck Nokia! You’re going to need it.

  • bz

    Qt is not a rutime, it is a C++ based cross-platform devellopment API. The major difference with Flash or Silverlight is that it’s going a lot faster and it is native application, not web-application…
    By the way it is already running in windows, mac, linux and symbian…

    • Stefan Constantinescu

      Silverlight runs .NET code, it was added on later. Flash has action script, which was added on later. Qt started as a cross platform runtime, but now they’re adding the web stuff that the other two major runtimes had from day 1.

      • Jody

        But QT is fundamentally different than some runtime like .NET, Java, or Flash. They are all based on some virtual machine running some type of bytecode. QT is a C++ framework compiled to totally native code.

        There is no real difference between a native application written to GTK on Linux/Maemo, or Win32 on Windows, or Cocoa on Mac, or to QT on any platform.

        QT is not a runtime. Just because it has one control/widget that contains a web component doesn’t make it so, and I think everyone running the KDE desktop on Linux would be quite upset by the comparison.

  • Dan

    Jody:

    While it is true that Qt is not a runtime, it's goal is to behave like one.

    The difference is that with Silverlight, Java, and Flash, there is a strong enforcement of cross platform compatibility. C++ and pre-compiled native binaries have no such enforcement.

    The goal of Qt is exactly that of Silverlight, Java and Flash. To achieve this in a C++ development environment, the developer has to be mindful of the dependencies he/she introduces. Qt is basically the class library to end all class libraries. You have to use it's data-structures and APIs exclusively in your application. Do you have better networking code from some library other than Qt? Tough. You have to use Qt's code, or ensure that magic networking code you have ALSO has the platform support that Qt has, or you just lost sight of Qt's purpose. This sounds like the walls around Silverlight, Java and Flash.

    Somewhere along the lines, people have gotten the strange notion that native code binaries are better than managed frameworks. The truth of that lies in what you value at runtime, or if you want to believe everything the iMarketing people tell you.

    While I am uncertain if this is true in Flash, I do know that .Net/Silverlight and Java do not interpret the "byte" code as you have implied. This "byte code" is merely a compressed and encrypt-able form of the application's source code that is compiled at runtime into native code just like a C++ application.

    There are a lot of advantages to this. Runtime compilation allows the compiler to take the machine's current state into consideration when adding optimizations. Do you have lots of memory available? Great! The compiler can generate code that in-lines methods more frequently. Mobile OS's such as Android, iOS and RIM have an installation process. If machine state optimizations are not important, the native code can be compiled at this point of the process.

    Furthermore, since the "byte code" is processor/OS agnostic, the final file is actually deployable across different platforms without the need to "re-compile" separate versions for each target platform (which is impossible to do with pre-generated native binaries). The native compilation occurs when that application is executed (or at installed).

    Managed frameworks also provide the benefit of code security and protect against common memory leaking mistakes of C++ programmers. They also ensure the application is playing by the rules of the OS to make sure one application is not corrupting the workspace of another. Native applications, and specifically ones developed in close-to-the-metal C++ leave almost all of this up to the developer.

    The disadvantages of this is speed. But not by very much. A C++ program not written with every efficiency in mind is going to perform the same way as a managed application. And a C++ program optimized to it's fullest extent tends to be brittle to change, hard to debug and not easy to maintain.

    Which finally leads us to the cost of development in all of this. Native code C++ applications are generally more expensive to write if you're following best practices of the software development life cycle. There are a lot more tests that need to be written to ensure that not only does the application work, but that it plays well with other applications and it doesn't do things like not give memory back once the program has terminated.

    @Stefen
    Unfortunately, you are probably correct about the Open Web standard platforms being the winner in the end. But this is truly another VHS vs Beta Max type of thing. HTML5, CSS, JS are not better technologies by a long shot. HTML5 is born out of date, a lot slower (sure, some browsers compile JS, but html mark-up and CSS are still interpretted), and even between browsers on a common OS, there is no guarantee that the application will run the same way.

    HTML5 is based on the same loose "standards" that HTML has always been based on. Which means no "official" test suite provided by the WWW consortium, and much like laws, these "standards" are open to interpretation. This spells trouble for cross platform (and browser) development. You only need to look to the past to see the issues of cross platform and browser compatibility are bound to repeat. The winner here will be the browser with the greatest market share. Which probably means IE (or maybe the iOS browser). So much for open standards. The winner drives the interpretation of the standards.

    If you want to bet on a horse that will provide a more consistent experience across platforms, Silverlight, Java, Flash and QT are the ones that will do that. But if you don't care about consistency, or your app is so simple that the consistency doesn't matter, then HTML5 is the ticket.

Back to top ▴