Showing posts with label Architecture maemo. Show all posts
Showing posts with label Architecture maemo. Show all posts

Difference between Android and Maemo

Difference between Android and Maemo




Technically, both Maemo and Android run on Linux kernels. However, Maemo is a full Linux distro, based on Debian, while Android is a sole kernel with a few programs on top of it (namely, Dalvik virtual machine and Sqlite database). On Adnroid all applications run within Dalvik virtual machine, which is heavily optimized and modified version of Java virtual machine (JVM). I tried to analyze the benefits of each platform from the perspective of a software developer, as well as platforms' current "strategic position". If you are too busy to read all the details, there is a short summary paragraph at the end of each chapter.



Android vs Maemo from developer's perspective

Development.

Maemo SDK is Linux-only. It's not a problem for me (as Linux is my OS of choice), but it may be a problem for many developers. SDK works best on Debian or Debian-based distros (e.g. Ubuntu). Maemo is also a Debian-based distro, so SDK simply uses Scratchbox cross-compilation toolkit to build for both x86 and ARM architectures.
Maemo applications are developed in GTK+ using Hildon application framework. Naturally, the primary language of Maemo application development is C. Other languages can also be used, as GTK+ has bindings for many programming languages, including C++, Java, C#, Ruby etc. However, most applications will be developed in C, mainly due to performance constraints, which are especially actual for mobile devices. GTK+ itself is a bit archaic by today's standards, and although Hildon is specifically targeted for touch-screen interfaces, most of work is still done in GTK+ and good old C. Thus, the development platform is not on par with modern mobile application development environments such as iPhone SDK, Android SDK, or Palm WebOS Mojo SDK. This may change with Maemo 6 release (codenamed "Harmattan") when Qt libraries will be supported and Qt will become Maemo official application development framework. But this will happen somewhere in 2011, so for now Maemo application development is a step behind that of Android.
Update: As multiple commenters pointed out, Qt should be already used for Maemo application development. It's a modern way to develop cross-platform apps that will run on both Maemo and Symbian OS (as well as Windows/Mac OS X/Linux, although it may not be practical to use similar UI for both desktop and mobile software). The earlier Qt becomes official application development framework for Maemo and Symbian OS, the better.

Android SDK is available for Windows, Linux, and Mac OS X. Applications are developed in Java and the development platform is really easy to get into. It features XML (DSL) for GUI interface building, easy strings internationalization, app storage within SQLite database, background processes management etc. To make a long story short, it's how modern mobile application development platform should look like. The only downside is that all applications are in Java, and for some developers Java became the synonym of slowness (although it's not that slow on Android, as Dalvik VM is specifically optimized for running on it). For such developers, there is an option of using Native Android SDK, although its capabilities are very limited, especially in hardware access department.

Porting existing applications.

In this area, Maemo has a huge advantage over Android, as it's a full Debian based distro. With the help of Scratchbox Cross Compilation Toolkit many open-source tools can be compiled for ARM architecture. A number of command line utilities can be ported with a simple cross-compilation, GUI apps usually require UI rewrite, but anyway it's much easier to port open-source app to Maemo than to write it from scratch. Some of the famous open-source apps are already ported to Maemo: MPlayer, Pidgin, Gnumeric, Abiword and many others.
On Android, porting an open-source app from x86 Linux is almost as hard as porting an app from any other platform: all UI and logic has to be rewritten from scratch.

Summary: Development is easier on Android platform, while porting existing apps is easier for Maemo platform.

Strategic position

Both platforms are aimed at the same vertical market: smartphones – MIDs – netbooks. Maemo is backed by Nokia alone, while Android is backed by Open Handset Alliance, whose members include Google, Samsung, LG, Motorola, HTC, Acer and others. Nokia may be the largest mobile phone and smartphone manufacturer on the planet, but it cannot compete with such a might. Thus, it's obvious that in the nearest future Android devices will outnumber Maemo devices by a large margin. There should be 18 Android devices released by the end of the year, while there will be only 4 Maemo devices released by that time (Nokia N770, N800, N810, N900). Even if N900 and new Maemo MIDs, and finally netbooks will sell better than their Android counterparts, the total install base of Android devices will grow faster than that of Maemo devices. The larger install base, the more OS is interesting for developers (assuming, it has a decent app dev platform). Nokia's main competitors - Samsung and LG - will use Android as a competitive advantage, and throw their development and marketing efforts behind this platform. Motorola is trying to save itself with its MOTOCLIQ aggressive pricing and MOTOBLUR Android software, and it has the chances to succeed!. Under the circumstances, Maemo becomes Nokia's main competitive advantage, so the company should throw its efforts behind it or lose market leadership. The position of fierce competition ensures the bright future for both platforms. However, which platform will finally win is another question, and perhaps the most interesting one. The logical winner is Android: it'll have larger install base in the nearest future; more developers will work on apps for Android; it is backed by powerful corporations, mighty Google among them. Nevertheless, there is a single power that can keep Maemo up float and possibly even make it prevail in the long term: open-source community. You'd argue: both Maemo and Android are open source. It doesn't matter. What matters is whether the platform could benefit from countless man-years of efforts, done by open-source community. Android benefits only from Linux kernel development and a small number of other open-source projects, all Android apps have to be written from scratch. Contrary to that, any open-source project which runs on Linux indirectly contributes into Maemo software ecosystem (as it can be relatively easily ported). Maemo has to use this to its own advantage, or it has no chance against Android. Thus, Maemo core developers should make this advantage even bigger by easing the process of porting open-source apps to Maemo, which can be achieved by migrating from ARM to x86 at some point.
Another advantage of Maemo is that it's more suitable for larger devices - MIDs and netbooks. Maemo was designed to run on MIDs, and it already proved its worth in this area. Being a Debian-based distro, Maemo will probably fit well on touchscreen netbooks as well. Android looks good on smartphones, but it remains to be seen whether it will be enough for netbooks. There is a chance that Android will succeed on smartphone market, while Maemo will prevail on MIDs and netbooks.

Summary: Android has better strategic position at the moment: Android devices will outnumber Maemo devices in the nearest future, it will also have more developers (better development platform + larger install base). Still, Maemo can win after all if it plays nicely with open-source community and utilizes its tremendous work. Another Maemo advantage is that it's better for MIDs and netbooks.


Post scriptum

Either Android or Maemo, Linux will win after all :)

Post post scriptum

As much as you may prefer Android, Maemo, or other smartphone OS, the ideal situation for smartphone market as a whole would be healthy competition between a few major platforms, not a single platform dominance. Maemo and Android are both open-source and overly good operating systems, so it will be good if they become those dominate platforms, not killing each other, but competing in equilibrium for years, bringing innovation along the way.


Update

For more insights and opinions on topic, please read the comments below and the article's discussions on Reddit and Maemo Talk.
Summarizing the opinions, I've listed the following advantages of each platform:

Android advantages:


1. Binary compatibility between releases. Technically, it's byte code compatibility in Android's case. Maemo lacks it, which means hard time for developers with every new release.
2. Android is better positioned at mid-end smartphone market, where it will compete with Symbian OS.


Maemo advantages:


1. Better game development, especially cross-platform game development.
2. Qt can (and should!) be used for cross-platform development for both Maemo and Symbian OS, which equals developing with modern app dev framework for the largest smartphone install base.

Maemo Architecture

3.1 Kernel
Maemo uses a Linux 2.6 operating system kernel. Linux is an open source operating
system developed by thousands of volunteers and companies that share their work under
GNU GPL license. Architecturally Linux has a monolithic kernel. All kernel code
is run under supervisor mode. Kernel can be extended at runtime by dynamically loadable
kernel modules. Various APIs exist for device driver, file system and networking
protocol modules. Developers can add new kernel modules.
The maemo kernel is based on the ARM kernel branch and can be modified, recompiled
and flashed by a developer. The Kernel Guide for maemo[34] gives details of
these procedures. Some of the modules like WLAN come as binary only which means
that the module APIs should remain unchanged if kernel is changed by a developer.
3.2 Base distribution
Maemo is based to a large extent on the same open source components found in the
Debian[7] Linux distribution. Maemo builds on GNU/Linux for operating system core
and GNOME/GTK+ for user interface architecture.
Maemo uses the same component packaging system as Debian - dpkg-tool’s binary
packages. New packages can be installed, old ones can be removed and the whole system
can be upgraded by the package management framework. The file system structure
also comes from Debian.
In order to run the software on a Internet Tablet, various optimizations and enhancements
have been made. These include power management related issues, touchscreen
input, performance and size optimizations. In order to reduce space maemo uses a shell
and command line tools from Busybox[4].
Also notably the maemo platform adheres closely to the GNOME Mobile
Platform[16]. At the time of writing, maemo uses all the same components as this
platform except for service discovery,The maemo architecture guide[39] goes gives more detailed information of the overall maemo architecture.

3.3 Application framework
The purpose of an application framework is to help application development by providing
a standard structure for an application. Applications that have a graphical user
interface tend to have a similar structure, e.g. the event-driven runtime model. The
events are triggered by the user, for example, by touching a button on the touchscreen.
Events can also be triggered by the application engine itself. An example is when
new data is received from the network. The application framework of maemo is called
Hildon. It is partially based on the same technologies that GNOME framework is built
on, most notably the GTK+ components.
Hildon has several additions and enhancements to GNOME/GTK+ including
Hildon widget set, Sapwood theme engine and image server, task navigator, Hildon
control panel and status bar. Some of the changes to standard GNOME like Sapwood,
for instance, are to reduce memory requirements and to improve speed on a small
hand-held device. In addition, Hildon framework has many features to support mobility
like automatic state saving, touchscreen input methods, and window management
on a physically small device.
The programming APIs are familiar to GNOME and GTK+ developers. The framework
has GLib and GObject object management system underneath. The GTK+ widget
set is provided with Hildon extensions. The interprocess communication is done using
D-BUS messages. The user files are accessed through GNOME-VFS and multimedia
applications can use GStreamer to get accelerated support for various codecs. User
configurations are stored via GConf and an XML parser API is available.
                                                                   
The figure above illustrates the most crucial components and their dependencies
that the maemo application developer must deal with.

3.4 maemo compared to desktop Linux distributions
Ubuntu[71] is a popular Debian based Linux distribution for the ordinary desktop. The
Ubuntu wiki[70] lists the key differences of Ubuntu and Debian. As one of the design
principles of maemo has been to be as close as a traditional desktop Linux as feasible,
here the differences between Debian/Ubuntu and maemo are explained in detail.
3.4.1 CPU architecture differences
Where as Debian supports multiple CPU architectures, Ubuntu’s set is a bit more restricted.
Compared to that maemo is an embedded ARM EABI[2] distribution. Maemo
is also cross-compiled instead of natively compiled like Debian or Ubuntu. Maemo also
uses different versions of toolchains (GCC, glibc[19] etc.) than Ubuntu or Debian for
ARM feature support and maturity differences between architectures.
3.4.2 Security model differences
Instead of a multi-user system such as a traditional Linux desktop, maemo is considered
a single user desktop system. The security model in maemo is focused on protecting
the user from remote attacks and from his/herself, not from other users. Maemo also
uses suid root binaries and /etc/password where as Ubuntu enforces the use of sudo
and shadow passwords.
Unlike Ubuntu, maemo makes use of a root account like Debian does but has a trivial
default password. The user should really change the root password before installing
e.g. OpenSSH to the device with root login.
3.4.3 Base system differences
The greatest difference in the base system is that maemo uses a lightweight BusyBox[4]
replacement for the essential GNU utilities[20] on the device e.g. ls and sh. In maemo
kernel and initfs reside in separate partitions and cannot be updated with a package
manager like with a common desktop Linux. Programs in initfs use uClibc[72] instead
of glibc. Ubuntu has Perl and Python languages as essential packages, Debian has only
Perl and maemo has neither. Maemo has no debconf. Ubuntu uses Upstart for device
startup instead of SYSV init scripts used in maemo.
maemo







What is Maemo

 Maemo is a platform for  developers willing to bring their applications to the Nokia Internet Tablets. These mobile devicesrun a Linux-based operating system on ARM architecture. The maemo software development
kit (SDK) is currently provided natively for desktop GNU/Linux distributionssuch as Debian and Ubuntu. The SDK can also be used in other operating systemsthrough a virtual environment.

It is simple to get started even if concepts like cross-compilation or
touchscreen user interface design are not familiar to the reader. Those familiar with
GNU/Linux, GTK+ toolkit and C programming language will feel right at home.
This guide is also a good starting point for software development for any platform
or device related to the GNOME Mobile family. As well as giving an introduction on
new frameworks, libraries and tools provided by maemo, overall design concepts for
this new generation of internet-capable devices are explained.