Documentation/Maemo For Symbian Developers Guide/Maemo and Symbian OS Concepts

(Active objects and threads: reformat code example)
(wikify)
Line 1: Line 1:
-
= Maemo and Symbian OS Concepts =
 
-
 
The Symbian OS is famous for its design, concepts, and coding conventions. The Maemo platform gives the developer more freedom, but it also requires the developer to take more responsibility. The Maemo platform does not enforce any specific design patterns, so the developer is responsible for preventing memory leaks, buffer overflows, and other security problems.
The Symbian OS is famous for its design, concepts, and coding conventions. The Maemo platform gives the developer more freedom, but it also requires the developer to take more responsibility. The Maemo platform does not enforce any specific design patterns, so the developer is responsible for preventing memory leaks, buffer overflows, and other security problems.
Line 7: Line 5:
The following topics show the main programming differences for both environments.
The following topics show the main programming differences for both environments.
-
= Programming languages and libraries =
+
== Programming languages and libraries ==
-
Symbian developers must obey a lot of coding conventions to write code correctly. In Maemo this is no longer necessary because Maemo uses standard C and C++. Most software developed for the Maemo platform is written in C. This software widely uses Glib utility library that provides the object model adopted for Maemo (<span><font face="monospace">GObject</font></span>). However, C++ applications can also be written since there are several C++ bindings available for different libraries in the Maemo platform. Despite these bindings, C library calls should be made in code written for the Maemo platform sooner or later due to the fact that most part of the platform uses standard C and Glib. Due to Open C/C++, the Symbian developer should already be aware of the use of these libraries as well as STL, boost, and others C/C++ libraries.
+
Symbian developers must obey a lot of coding conventions to write code correctly. In Maemo this is no longer necessary because Maemo uses standard C and C++. Most software developed for the Maemo platform is written in C. This software widely uses GLib utility library that provides the object model adopted for Maemo (<code>GObject</code>). However, C++ applications can also be written since there are several C++ bindings available for different libraries in the Maemo platform. Despite these bindings, C library calls should be made in code written for the Maemo platform sooner or later due to the fact that most part of the platform uses standard C and GLib. Due to Open C/C++, the Symbian developer should already be aware of the use of these libraries as well as STL, boost, and other C/C++ libraries.
-
= Symbian OS essential concepts =
+
== Symbian OS essential concepts ==
Some differences between Symbian C++ and C++ used in Maemo are listed below. These differences are more about the conventions, concepts, and software design. Some replacements for missing Symbian/C++ specific concepts are also introduced.
Some differences between Symbian C++ and C++ used in Maemo are listed below. These differences are more about the conventions, concepts, and software design. Some replacements for missing Symbian/C++ specific concepts are also introduced.
-
== Naming guidelines ==
+
=== Naming guidelines ===
Symbian OS naming conventions like class names prefix (<span><font face="monospace">C</font></span>, <span><font face="monospace">M</font></span>, <span><font face="monospace">R</font></span>, or <span><font face="monospace">T</font></span>), function leave indication (<span><font face="monospace">L</font></span> suffix) are left behind when programming for Maemo platform. In Maemo, the developer is given more freedom and there are no mandatory prefixes in class names. Although there are no strict rules to be followed, Maemo has some programming guidelines that should be considered. Some examples are given below:
Symbian OS naming conventions like class names prefix (<span><font face="monospace">C</font></span>, <span><font face="monospace">M</font></span>, <span><font face="monospace">R</font></span>, or <span><font face="monospace">T</font></span>), function leave indication (<span><font face="monospace">L</font></span> suffix) are left behind when programming for Maemo platform. In Maemo, the developer is given more freedom and there are no mandatory prefixes in class names. Although there are no strict rules to be followed, Maemo has some programming guidelines that should be considered. Some examples are given below:
Line 25: Line 23:
Local variables should always be favoured over global variables, i.e. the visibility of a variable should be kept at a minimum. Global variables should not be used to pass values between functions: this can be performed with arguments. Note: Global variables require extra care when programming with threads. Thus, these should be avoided.
Local variables should always be favoured over global variables, i.e. the visibility of a variable should be kept at a minimum. Global variables should not be used to pass values between functions: this can be performed with arguments. Note: Global variables require extra care when programming with threads. Thus, these should be avoided.
-
== Runtime type information ==
+
=== Runtime type information ===
Symbian OS supports runtime type information (RTTI) only from Symbian OS v9 onwards. In Maemo, run time type information was available since the beginning. In both cases, the [http://www.cplusplus.com/doc/tutorial/typecasting/ dynamic_cast] operator is used to retrieve RTTI.
Symbian OS supports runtime type information (RTTI) only from Symbian OS v9 onwards. In Maemo, run time type information was available since the beginning. In both cases, the [http://www.cplusplus.com/doc/tutorial/typecasting/ dynamic_cast] operator is used to retrieve RTTI.
-
== Exceptions ==
+
=== Exceptions ===
Symbian/C++ developers are familiar with concepts like ''leaving'' and ''trap harness'' because standard [http://www.cplusplus.com/doc/tutorial/exceptions/ C++ exceptions] did not exist when Symbian OS was originally developed. Only from Symbian OS v9 onwards C++ were exception mechanisms supported, although they still should not be mixed with Symbian/C++ code. In Maemo the standard C++ exceptions (try, catch, throw) are available.
Symbian/C++ developers are familiar with concepts like ''leaving'' and ''trap harness'' because standard [http://www.cplusplus.com/doc/tutorial/exceptions/ C++ exceptions] did not exist when Symbian OS was originally developed. Only from Symbian OS v9 onwards C++ were exception mechanisms supported, although they still should not be mixed with Symbian/C++ code. In Maemo the standard C++ exceptions (try, catch, throw) are available.
-
== Cleanup stack ==
+
=== Cleanup stack ===
-
A Symbian/C++ specific concept that is not available in the Maemo platform. Similar functionality can be achieved by using [http://en.wikipedia.org/wiki/Auto_ptr auto_ptr] class which is also available for Symbian v9 onwards. <span><font face="monospace">auto_ptr</font></span> is a [http://en.wikipedia.org/wiki/Smart_pointer smart pointer] implementation in [http://en.wikipedia.org/wiki/Standard_Template_Library C++ Standard Template Library], and it is a good way to prevent memory leaks in case of exceptions ([http://maemo4mobile.garage.maemo.org/snippet_autoptr.html view example]).
+
A Symbian/C++ specific concept that is not available in the Maemo platform. Similar functionality can be achieved by using [http://en.wikipedia.org/wiki/Auto_ptr auto_ptr] class which is also available for Symbian v9 onwards. <span><font face="monospace">auto_ptr</font></span> is a [[:wikipedia:Smart_pointer|smart pointer]] implementation in [[:wikipedia:Standard_Template_Library |C++ Standard Template Library]], and it is a good way to prevent memory leaks in case of exceptions ([http://maemo4mobile.garage.maemo.org/snippet_autoptr.html view example]).
-
For more information on using the <span><font face="monospace">auto_ptr</font></span>, see the article [http://www.gotw.ca/publications/using_auto_ptr_effectively.htm Using auto_ptr Effectively].
+
For more information on using the <code>auto_ptr</code>, see the article [http://www.gotw.ca/publications/using_auto_ptr_effectively.htm Using auto_ptr Effectively].
-
= Class construction =
+
== Class construction ==
-
The Symbian OS documentation states that if a class has to allocate memory, it should be derived from <span><font face="monospace">CBase</font></span>. In Maemo, there is no such base class. This design causes some differences.
+
The Symbian OS documentation states that if a class has to allocate memory, it should be derived from <code>CBase</code>. In Maemo, there is no such base class. This design causes some differences.
-
== Class inheritance ==
+
=== Class inheritance ===
-
In Symbian/C++ multiple inheritances are only allowed when combining multiple M-classes and one <span><font face="monospace">CBase</font></span> derived class. This is the same approach adopted by Java that allows multiple interfaces implementations and only one class derivation per class. The reason is that multiple inheritances can become too complicated. Maemo does not impose any limits to the inheritance mechanism, so the developer has more freedom as well as more responsibility.
+
In Symbian/C++ multiple inheritances are only allowed when combining multiple M-classes and one <code>CBase</code> derived class. This is the same approach adopted by Java that allows multiple interfaces implementations and only one class derivation per class. The reason is that multiple inheritances can become too complicated. Maemo does not impose any limits to the inheritance mechanism, so the developer has more freedom as well as more responsibility.
-
== Two-phased construction ==
+
=== Two-phased construction ===
Since the full C++ exception mechanism is used in Maemo (which includes stack unwinding), the two-phased construction of objects is not needed any more. The developer should use smart pointers to store pointers which may leak in case of exceptions. See the brief example from listing below:
Since the full C++ exception mechanism is used in Maemo (which includes stack unwinding), the two-phased construction of objects is not needed any more. The developer should use smart pointers to store pointers which may leak in case of exceptions. See the brief example from listing below:
-
<code>class MyInnerClass
+
<source lang="cpp">class MyInnerClass
{
{
public:
public:
MyInnerClass(){}
MyInnerClass(){}
-
}<nowiki>;
+
};
/* ----------------------------------------------- */
/* ----------------------------------------------- */
class MyClass
class MyClass
-
</nowiki>{
+
{
public:
public:
MyClass();
MyClass();
private:
private:
-
auto_ptr&lt;MyInnerClass&gt; m_inner;
+
auto_ptr<MyInnerClass> m_inner;
-
}<nowiki>;
+
};
MyClass::MyClass() : m_inner (new MyInnerClass())
MyClass::MyClass() : m_inner (new MyInnerClass())
-
</nowiki>{
+
{
}
}
Line 74: Line 72:
void functionFoo()
void functionFoo()
{
{
-
auto_ptr&lt;MyClass&gt; myAutoObject(new MyClass());
+
auto_ptr<MyClass> myAutoObject(new MyClass());
/* IF THROW HERE ....*/
/* IF THROW HERE ....*/
-
}</code>
+
}
 +
</source>
-
In the example above, exceptions may be thrown after the instantiation of <span><font face="monospace">myAutoObject</font></span> or in the construction of <span><font face="monospace">MyInnerClass</font></span>. In both cases the objects do not leak memory due to the use of <span><font face="monospace">auto_ptr</font></span> class that holds the pointer of the objects and call the destructor in case of leave and end of scope. A good explanation can be found [http://www.parashift.com/c++-faq-lite/exceptions.html#faq-17.4 here].
+
In the example above, exceptions may be thrown after the instantiation of <code>myAutoObject</code> or in the construction of <code>MyInnerClass</code>. In both cases the objects do not leak memory due to the use of the <code>auto_ptr</code> class that holds the pointer of the objects and calls the destructor in case of leave the end of scope. A good explanation can be found [http://www.parashift.com/c++-faq-lite/exceptions.html#faq-17.4 in the exceptions section of the C++ FAQ].
-
= Descriptors =
+
== Descriptors ==
-
Descriptors class was specifically designed for Symbian OS and does not exist as such in the Maemo platform.
+
The <code>Descriptors</code> class was specifically designed for Symbian OS and does not exist as such in the Maemo platform.
-
= Strings =
+
== Strings ==
-
When working with strings, instead of descriptors you can use the C-style NULL-terminated character arrays and methods.
+
When working with strings, instead of descriptors you can use the C-style <code>NULL</code>-terminated character arrays and methods.
-
'''Null-terminated character arrays using standard C'''
+
=== NULL-terminated character arrays using standard C ===
-
[http://en.wikipedia.org/wiki/String.h The C-style NULL-terminated character arrays and methods] can be used to store strings only. They are not as safe because they can cause buffer overflow. They can only be used with character set based on ASCII. One advantage is that it is guaranteed to work on any platform which supports C.
+
[[:wikipedia:String.h|The C-style NULL-terminated character arrays and methods] can be used to store strings only. They are not as safe because they can cause buffer overflow. They can only be used with character set based on ASCII. One advantage is that it is guaranteed to work on any platform which supports C.
-
'''NULL-terminated character arrays using Glib'''
+
=== NULL-terminated character arrays using Glib ===
-
<span><font face="monospace">GLib</font></span> is extensively used in the Maemo platform, so it is good practice to use the [http://library.gnome.org/devel/glib/stable/glib-String-Utility-Functions.html GLib-provided types and methods if using character arrays], although nothing prevents the developer from using other types.
+
GLib is extensively used in the Maemo platform, so it is good practice to use the [http://library.gnome.org/devel/glib/stable/glib-String-Utility-Functions.html GLib-provided types and methods if using character arrays], although nothing prevents the developer from using other types.
See the [http://maemo4mobile.garage.maemo.org/snippet_gchar.html example].
See the [http://maemo4mobile.garage.maemo.org/snippet_gchar.html example].
Line 100: Line 99:
=== GString ===
=== GString ===
-
[http://library.gnome.org/devel/glib/stable/glib-Strings.html GString] from the <span><font face="monospace">Glib</font></span>. Similar to a standard C string, except that it grows automatically when text is appended or inserted. Also, it stores the length of the string, so it can be used for binary data which contains bytes with <span><font face="monospace">NULL</font></span> values.
+
[http://library.gnome.org/devel/glib/stable/glib-Strings.html GString] from GLib. Similar to a standard C string, except that it grows automatically when text is appended or inserted. Also, it stores the length of the string, so it can be used for binary data which contains bytes with <code>NULL</code> values.
See the [http://maemo4mobile.garage.maemo.org/snippet_gstring.html example].
See the [http://maemo4mobile.garage.maemo.org/snippet_gstring.html example].
-
== String class ==
+
=== String class ===
-
[http://en.wikipedia.org/wiki/String_(C++) String class] from the [http://en.wikipedia.org/wiki/Standard_Template_Library C++ Standard Template Library]. The <span><font face="monospace">string</font></span> class resizes automatically when necessary.
+
[[:wikipedia:String_(C++)|String class]] from the [[:wikipedia:Standard_Template_Library|C++ Standard Template Library]]. The <code>string</code> class resizes automatically when necessary.
-
See the [http://maemo4mobile.garage.maemo.org/snippet_stlstring.html example].
+
See the [http://maemo4mobile.garage.maemo.org/snippet_stlstring.html STL string example].
== Binary data ==
== Binary data ==
Line 114: Line 113:
If you are working with binary data, you can use:
If you are working with binary data, you can use:
-
* Low-level, C-language memory allocation and [http://en.wikipedia.org/wiki/String.h handling].
+
* Low-level, C-language memory allocation and [[:wikipedia:String.h|handling]].
-
* GArray from GLib - arrays of arbitrary elements which grow automatically as elements are added.
+
* <code>GArray</code> from GLib - arrays of arbitrary elements which grow automatically as elements are added.
-
* GString that works also with binary data, as it stores the data length.
+
* <code>GString</code> that works also with binary data, as it stores the data length.
-
* [http://en.wikipedia.org/wiki/Standard_Template_Library#Containers C++ containers] (for example, vectors and lists).
+
* [[:wikipedia:Standard_Template_Library#Containers|C++ containers]] (for example, <code>vector</code>s and <code>list</code>s).
-
= Active objects and threads =
+
== Active objects and threads ==
Symbian OS discourages the usage of threads because context switching is considered an expensive operation which degrades battery life. Basically, this is true in the Maemo platform too, but avoiding threads at all cost is not required.
Symbian OS discourages the usage of threads because context switching is considered an expensive operation which degrades battery life. Basically, this is true in the Maemo platform too, but avoiding threads at all cost is not required.
Line 164: Line 163:
* <code>GThread</code> from GLib
* <code>GThread</code> from GLib
-
= Static data in DLLs =
+
== Static data in DLLs ==
-
In Symbian OS version before v9 static data in DLLs was not supported. From v9 onwards static data is supported but it consumes big amounts of RAM memory. The Maemo platform does not have this limitation. You can use, for example, global variables in your shared libraries. Note, however, that the static data is not shared between the processes.
+
In Symbian OS version before v9 static data in DLLs was not supported. From v9 onwards static data is supported but it consumes large amounts of memory. The Maemo platform does not have this limitation. You can use, for example, global variables in your shared libraries. Note, however, that the static data is not shared between the processes.
-
= Platform security =
+
== Platform security ==
-
Platform security does not exist in the Maemo platform. When installing software with the Application Manager, it only warns if the software is NOT being downloaded from the official Maemo repositories. The Maemo does not have a specific scheme to enforce platform security as Symbian has. One benefit is that installing software in Maemo is more developer-friendly than in Symbian.
+
Platform security does not exist in the Maemo platform. When installing software with the Application Manager, it only warns if the software is NOT being downloaded from the official Maemo repositories. Maemo does not have a specific scheme to enforce platform security as Symbian has. One benefit is that installing software in Maemo is more developer-friendly than in Symbian.
-
= Client-server model =
+
== Client-server model ==
Whereas Symbian OS extensively uses a client/server approach with asynchronous method calls, the Maemo platform uses direct, synchronous API calls. Usually this means that called functions block until they finish, with some exceptions.
Whereas Symbian OS extensively uses a client/server approach with asynchronous method calls, the Maemo platform uses direct, synchronous API calls. Usually this means that called functions block until they finish, with some exceptions.

Revision as of 10:00, 12 July 2010

The Symbian OS is famous for its design, concepts, and coding conventions. The Maemo platform gives the developer more freedom, but it also requires the developer to take more responsibility. The Maemo platform does not enforce any specific design patterns, so the developer is responsible for preventing memory leaks, buffer overflows, and other security problems.

Programming in Maemo is closer to desktop programming than Symbian programming is. This is because it is based on Linux, which was created for desktop environments, whereas Symbian OS was specifically developed for resource constrained systems. For this reason, the Maemo developer has more freedom than the Symbian developer.

The following topics show the main programming differences for both environments.

Contents

Programming languages and libraries

Symbian developers must obey a lot of coding conventions to write code correctly. In Maemo this is no longer necessary because Maemo uses standard C and C++. Most software developed for the Maemo platform is written in C. This software widely uses GLib utility library that provides the object model adopted for Maemo (GObject). However, C++ applications can also be written since there are several C++ bindings available for different libraries in the Maemo platform. Despite these bindings, C library calls should be made in code written for the Maemo platform sooner or later due to the fact that most part of the platform uses standard C and GLib. Due to Open C/C++, the Symbian developer should already be aware of the use of these libraries as well as STL, boost, and other C/C++ libraries.

Symbian OS essential concepts

Some differences between Symbian C++ and C++ used in Maemo are listed below. These differences are more about the conventions, concepts, and software design. Some replacements for missing Symbian/C++ specific concepts are also introduced.

Naming guidelines

Symbian OS naming conventions like class names prefix (C, M, R, or T), function leave indication (L suffix) are left behind when programming for Maemo platform. In Maemo, the developer is given more freedom and there are no mandatory prefixes in class names. Although there are no strict rules to be followed, Maemo has some programming guidelines that should be considered. Some examples are given below:

Descriptive, lower-case names should be used for variables and functions. Underscores (_) can be used to indicate word boundaries. Non-static and unnecessary global names should be avoided. If it is absolutely necessary to employ a global variable, type or function, one should use a prefix specific to the library or module where the name is, e.g. gtk_widget_.

Static memory (variables) should be preferred to dynamic memory, when the needed memory size is not large and/or is used regularly in the program. Static memory does not leak, a pointer to static memory is less likely to cause a segmentation fault, and using static memory keeps the memory usage more constant.

Local variables should always be favoured over global variables, i.e. the visibility of a variable should be kept at a minimum. Global variables should not be used to pass values between functions: this can be performed with arguments. Note: Global variables require extra care when programming with threads. Thus, these should be avoided.

Runtime type information

Symbian OS supports runtime type information (RTTI) only from Symbian OS v9 onwards. In Maemo, run time type information was available since the beginning. In both cases, the dynamic_cast operator is used to retrieve RTTI.

Exceptions

Symbian/C++ developers are familiar with concepts like leaving and trap harness because standard C++ exceptions did not exist when Symbian OS was originally developed. Only from Symbian OS v9 onwards C++ were exception mechanisms supported, although they still should not be mixed with Symbian/C++ code. In Maemo the standard C++ exceptions (try, catch, throw) are available.

Cleanup stack

A Symbian/C++ specific concept that is not available in the Maemo platform. Similar functionality can be achieved by using auto_ptr class which is also available for Symbian v9 onwards. auto_ptr is a smart pointer implementation in C++ Standard Template Library, and it is a good way to prevent memory leaks in case of exceptions (view example).

For more information on using the auto_ptr, see the article Using auto_ptr Effectively.

Class construction

The Symbian OS documentation states that if a class has to allocate memory, it should be derived from CBase. In Maemo, there is no such base class. This design causes some differences.

Class inheritance

In Symbian/C++ multiple inheritances are only allowed when combining multiple M-classes and one CBase derived class. This is the same approach adopted by Java that allows multiple interfaces implementations and only one class derivation per class. The reason is that multiple inheritances can become too complicated. Maemo does not impose any limits to the inheritance mechanism, so the developer has more freedom as well as more responsibility.

Two-phased construction

Since the full C++ exception mechanism is used in Maemo (which includes stack unwinding), the two-phased construction of objects is not needed any more. The developer should use smart pointers to store pointers which may leak in case of exceptions. See the brief example from listing below:

class MyInnerClass
{
public:
MyInnerClass(){}
};
 
/* ----------------------------------------------- */
class MyClass
{
public:
MyClass();
 
private:
auto_ptr<MyInnerClass> m_inner;
};
 
MyClass::MyClass() : m_inner (new MyInnerClass())
{
}
 
/* ----------------------------------------------- */
void functionFoo()
{
auto_ptr<MyClass> myAutoObject(new MyClass());
/* IF THROW HERE ....*/
}

In the example above, exceptions may be thrown after the instantiation of myAutoObject or in the construction of MyInnerClass. In both cases the objects do not leak memory due to the use of the auto_ptr class that holds the pointer of the objects and calls the destructor in case of leave the end of scope. A good explanation can be found in the exceptions section of the C++ FAQ.

Descriptors

The Descriptors class was specifically designed for Symbian OS and does not exist as such in the Maemo platform.

Strings

When working with strings, instead of descriptors you can use the C-style NULL-terminated character arrays and methods.

NULL-terminated character arrays using standard C

[[wikipedia:String.h|The C-style NULL-terminated character arrays and methods] can be used to store strings only. They are not as safe because they can cause buffer overflow. They can only be used with character set based on ASCII. One advantage is that it is guaranteed to work on any platform which supports C.

NULL-terminated character arrays using Glib

GLib is extensively used in the Maemo platform, so it is good practice to use the GLib-provided types and methods if using character arrays, although nothing prevents the developer from using other types.

See the example.

GString

GString from GLib. Similar to a standard C string, except that it grows automatically when text is appended or inserted. Also, it stores the length of the string, so it can be used for binary data which contains bytes with NULL values.

See the example.

String class

String class from the C++ Standard Template Library. The string class resizes automatically when necessary.

See the STL string example.

Binary data

If you are working with binary data, you can use:

  • Low-level, C-language memory allocation and handling.
  • GArray from GLib - arrays of arbitrary elements which grow automatically as elements are added.
  • GString that works also with binary data, as it stores the data length.
  • C++ containers (for example, vectors and lists).

Active objects and threads

Symbian OS discourages the usage of threads because context switching is considered an expensive operation which degrades battery life. Basically, this is true in the Maemo platform too, but avoiding threads at all cost is not required.

Using the main event loop of GLib it is possible to run several asynchronous operations in a single thread, without blocking. This is fairly similar to using Active Objects. Examples of sources of events are file descriptors, sockets, even timeouts, and so on.

Below you see a timeout example function with event loop (based on Gnome developers' tutorial).

#include <glib.h>
 
#define COUNT_UNTIL 2
#define TIMEOUT 2
 
static int counter;
 
GMainLoop *main_loop;
 
gboolean timeout_func(gpointer data)
{
  counter++;
  g_printf("Running for the %d. time.\n", counter);
  if (counter == COUNT_UNTIL)
  {
    g_main_loop_quit(main_loop);
    return FALSE;
  }
  return TRUE;
}
 
int main(int argc, char *argv[])
{
  counter = 0;
  main_loop = g_main_loop_new(NULL, FALSE);
  g_timeout_add_seconds(TIMEOUT, timeout_func, NULL);
  g_main_loop_run(main_loop);
  return 0;
}

In case of dealing with threads you can use:

  • POSIX threads (the traditional Unix-style operating system type)
  • GThread from GLib

Static data in DLLs

In Symbian OS version before v9 static data in DLLs was not supported. From v9 onwards static data is supported but it consumes large amounts of memory. The Maemo platform does not have this limitation. You can use, for example, global variables in your shared libraries. Note, however, that the static data is not shared between the processes.

Platform security

Platform security does not exist in the Maemo platform. When installing software with the Application Manager, it only warns if the software is NOT being downloaded from the official Maemo repositories. Maemo does not have a specific scheme to enforce platform security as Symbian has. One benefit is that installing software in Maemo is more developer-friendly than in Symbian.

Client-server model

Whereas Symbian OS extensively uses a client/server approach with asynchronous method calls, the Maemo platform uses direct, synchronous API calls. Usually this means that called functions block until they finish, with some exceptions.

Using sockets is a good example of the differences between the Symbian OS and Maemo platforms, regarding the client-server model vs. direct API calls. See networking example.