Friday, May 24, 2013

Planet MeeGo, Day #2 : THe lost bricks, or : if you go back now, you really are a n00b!

We've landed on planet meego (intentionally or not, it is still unclear to me, but whatever).
We've understood there is more than QML on N9 : N9's soul is composed by MeeGo.
What is MeeGo? Or, wait, let me refrase : what was MeeGo?
MeeGo was meant to be the leading platform in mobile linux.
Born out of the two gods of linux Maemo and Moblin, the chimera MeeGo lasted, well, some laptops (funnily, my sister managed to get one by accident), and one mobile phone.
Reasons for this early death (Cripple Death Syndrome?) have been discussed and overdiscussed in other threads on other forums, and are not the center of the discussion here.
The center of the discussion is MeeGo, and more specifically developing under MeeGo.
So, how do you develope an application under MeeGo? You google : MeeGo Application, and this comes up. Too bad it's not MeeGo, it's QtQuick.
Let's try again:  google meego application example"; QML/QtQuick again!
"Wtf? Where is my MeeGo?". 

Right behind an obscure google term : meegotouch (third hit in Google, I mentioned even Google rules do not apply to MeeGo searches). Btw, according to some rumors, all the links should be removed by end of May by the Linux Foundation. This is not confirmed yet, so be not surprised if the links point to void. Just a heads up. In case it is going to happen, you should still be able to navigate the sites through the wayback machine (or some other mirror). Also, most likely many of the information in here might apply to SailfishOS as well, Jolla's upcoming MeeGo-based OS.

So anyway, we found our MeeGo! Wooho!
Building a MeeGo application seems easy. And it is, as can be seen from here.
According to Nokia Docs, a linux is preferred in order to build MeeGo apps.
I have been working with both WinXP and Win7 without many problems (well, maybe in WinXP some problems, but not under Win7 anymore). Yes, it is a bit more challenging, and yes, it is not as straightforward; and yes, if you are an absolute Free SW type of guy, and Wind0wz horrifies you, there is no reason to use anything else except linux (the only reason I am stuck on Wind0wz is due to lack of capacity to run a virtual machine with satisfying results). But this is not the point of the discussion now anyway.
Also, according to the above-mentioned docs, the MeeGo is referred by Nokias as part of the Platform SDK. But to me it seems more like meego *is* the PlatformSDK.

I think the most useful concept is the strictly Model-View-Controller architecture pattern of MeeGo.
As well as iOS (and probably Windows Phone), MeeGo separates the three in a very strict manner. This of course has positive and negative aspects. For example, if you do not know what MVC is, you will face a very hard time trying to figure out how to do things on your own.
Let's take the styling features as an example.
Did you know you can auto-generate styling components out of a simple interface (declared appropriately)? It is indeed, very easy. Two things are required:
  1. A (style) class declaration
  2. QtCreator declarations in .pro file to configure the helper tools to generate class stubs for the declared (style) class
Instructions on how to follow up on this can be found here.

Once the qmake is properly configured, and the files are properly included in your app, the MeeGo Application will autostyle itself, by looking up the stylesheets in predefined (Theme-based) paths.
This not only perfectly separates the look-and-feel from your C++ code; it also simplyfies your life as a programmer alot. Of course, this is deprecated technology, so it opens up doors to all kinds of weird (sometimes buggy) behaviours as well, but hey, it works, and so far I always found a work-around for some of the issues no problem.

But why MeeGo? Is this all it has to offer over, say, Qt and/or QML? Is it worth the catch?

Well, N9-technically speaking, yes. From a practical point of view, MeeGo tried to fuse the positive aspects of both worlds and combine them to a powerfull toolkit.
MeeGo escapes the clumsyness of QML (and well over its limits in many aspects, speed being the first one) and frees the programmer from the burden of managing alof of necessary UI-related functionalities, as well as giving a much better degree of flexibility and lean-ness, by providing out-of-the-box tools (like the styling, for instance) that Qt is missing.

Of course, there is also the fact that MeeGo is a dead platform (except for SailFishOS, but the extent of the compatibility with it is still to be confirmed IMHO. QML was supposed to be cross-platform, but as we have seen, on BB10 this is not the case (QtQuick vs Cascades)).

No comments: