A review of the GNOME 3 Platform

by EmilyGonyer and JuanjoMarin

Reviewed by Colin Walters

The GNOME development model relies on a powerful platform that comes with a stability API/ABI compromise. API stands for Application Programming Interface - it is what a compiler uses to build your application and ABI is the Application Binary Interface - what an application uses at runtime. This API /ABI stability compromise means backward compatibility in terms of source code and binary that not only benefits application developers, but also distributors and users.

Since GNOME 2.0 was released in 2002, new APIs have landed and some other APIs have been deprecated (though still available for old applications which require them). For GNOME 3, the entire development platform has been revamped, consolidated and streamlined. This way, many libraries which had become antiquated were replaced by new improved ones, and still others were simplified to ease development.

GTK+ has been one of the components of the platform that has received the most attention in the transition to GNOME 3, with many changes large and small, including various improvements in its overall performance:

* GTK+3 made a complete break from the old drawing X11-based API's, and now uses modern graphics facilities like Cairo which are both faster and more portable.

* GTK+ 3 includes a new capacity to easily support multiple backends (these can be built against simultaneously and selected at run time). This will make make the transition to new backends, such as Wayland, much easier.

* A new visual theming system was introduced using CSS syntax with a greater range of effects such as curves, gradients and alpha colors, implicit animations and RGBA colors. Using a language that designers understand eases the creation of new themes, and reduces the developers' role to a supporting one in the process.

* GTK+3 now also supports Xinput2 where applicable, allowing input device hot-plugging and support for complex input devices such as tablets. By enabling handling of multiple pointers it makes GTK+ ready for multitouch.

* Several new classes and widgets were added to GTK+3 including the GtkApplication class which takes care of many basic application tasks, by ensuring uniqueness, keeping track of windows, and exporting actions, among others. * New widgets were introduced like GtkLockButton for privileged operations and GtkFontChooserDialog which simplifies font selection.

Clutter is a new user interface library introduced with GNOME 3 which uses OpenGL to create fast, compelling, portable, and dynamic graphical user interfaces. This new library is used by GNOME Shell create the core GNOME 3 experience. Clutter can be used independently of GTK+, but there are future plans to integrate the toolkits.

On the side of deprecations we have libglade, libgnomeui, libsexy, gnome-vfs and libidl, ORBit2, libbonobo, libbonoboui, libgnome-print, libgnome-print-ui, libgnomecanvas. The functionalities that these libraries offered in the past are now included in other libraries like GTK+ or GLib.

The low-level library GLib has seen numerous improvements as well to support GNOME 3 features. Possibly the most remarkable change is the addition of GVariant, a flexible and powerful datatype that stores a value along with information about the type of that value. GDBus is the new GLib implementation of D-Bus in GNOME 3, relies on GIO streams as transport layer and on the GVariant type system which is explicitly designed to match D-Bus types. GVariant also is the cornerstone of the new the configuration interface GSettings. Dconf is the new high performance configuration system of GNOME that provides a backend to GSettings. It is significantly faster than GConf, particularly for read-only operations. This enables a faster startup of both the core desktop and applications.

GNOME 2 Accessibility was based on CORBA/Bonobo, and GNOME 3 is the first release of the platform which doesn't depend on Bonobo. Though the replacement of Bonobo for D-Bus has taken place during the GNOME 2 cycles, GNOME 3 is the culmination of such process, including the migration of the Assistive Technology Service Provider Interface (AT-SPI) using D-Bus for their transport technology.

Historically GNOME has been considered a binding-friendly platform. Many bindings were created, for example the popular Python binding to GTK+, PyGTK, but the development of every binding needed human intervention in order to capture all the details. The GObject introspection included in GNOME 3 solves this by putting all of the metadata inside the GObject library itself, using annotations in the comments. This will lead to less duplicate work from binding authors, and a more reliable experience for binding consumers. This means a new generation of bindings in GNOME, like Python PyGI or Javascript gjs.

Taken together, these and the many other changes to the GNOME 3 development platform have made development more enjoyable, while also allowing developers to get started more quickly and easily. By simplifying and minimizing the number of modules and libraries needed for development, compatibility issues should decrease, leading to fewer problems for both developers and users.

The GNOME desktop has evolved to be faster, more accessible, with a new dynamic user interface. Developers can take advantage of the updated GTK+ and GNOME platform to create more compelling applications.

Engagement/AnnualReport/AnnualReport2011/PlatformReview (last edited 2013-08-10 12:09:53 by AllanDay)