What could we do with Clutter ?

These last months i’ve been working with Clutter project as part our GNOME R&D project. Firstly, for who don’t know what Clutter project exactly is, i would like to briefly introduce you this technology.The Clutter project has created an open source software library for creating fast, visually rich and animated graphical user interfaces. Clutter uses OpenGL (and optionally OpenGL ES for use on Mobile and embedded platforms) for rendering but with an API which hides the underlying GL complexity from the developer. The Clutter API is intended to be easy to use, efficient and flexible.

Basically, Clutter provides a Canvas for drawing complex graphics and effects. This Canvas could be inserted inside a Gtk context, using the Clutter-Gtk library.

The second part of my post will be focused on my work during last R&D project iteration and what were my thoughts about this new and promising technology; there were several discussions in the gtk-devel list about the new GTK 3.0 evolution and what would be the role of Clutter project.

The best way to understand a technology, after read carefully all related documentation, is to implement a proof of concept. For that purpose, i’ve chosen the YouTube  client applications domain to develop new UI concepts, in order to test the powerful of Clutter as toolkit.

The first thing i’ve realized when i read the Clutter project documentation is that Clutter is not actually a toolkit, as it’s mentioned in Clutter project web page. With my understanding of the toolkit concept, it should be a set of tools for implementing user interfaces. However, user interfaces are not only graphical elements, but window management, theming support, advanced graphical components, translation support, applets and icons management, shortcuts, toolbars and menus or similar ways of activating user actions, … In that sense, Clutter lacks of several important features required to be considered as UI toolkit. I think that, at least at this moment, Clutter could be just considered as a graphical engine or scene graph tool. This point was also mentioned by some people inside gtk developers community who are considering the approach of using Clutter as scene graph concept for the next GTK 3.0.

When finally i began to develop my test application i had assumed that it actually wont be a functional YouTube client application, just an user interface proof of concept. Who knows what will happen in future, but for this project i’ ve focused the development in just one use case: querying for videos and show the results.  For implementing the communication with YouTube web services i’ve found a very interesting implementation of YouTube GData API: libgdata and libgdata-google.These libraries, also used inside evolution-data-server as static libraries, are also provided as independent libraries, at least, in Ubuntu hardy. These libraries, implemented using a GLib GObject approach, provide Client access to google POA through SOAP interface.

During the implementation of this YouTube client application i’ve implemented several UI for showing YouTube top_rated query results. The first approach was obviously a GtkTreeView view.

screenshot-youtube-test.png                               screenshot-clutter-ui.png

The first and simpler clutter approach would be to show results in a square grid. I have to say that the square grid its also possible to implement in Gtk, although Clutter provides more fancy effects.

After this first UI proposals, and after understanding better advanced operations with Clutter, i tried to define new ways of showing information, always thinking about how to improve the end user experience.

screenshot-clutter-ui2.png          screenshot-clutter-ui2-1.png          screenshot-clutter-ui3.png

The most interesting questions i’ve made to myself at this point have not been about Clutter technology capabilities, but what new UI concepts we want to achieve. I think there are several graphic technologies today providing new ways of drawing user interfaces, the important point is to define precisely how to present information and services to end users in a more intuitive way.

We are the champions !!!

Nobody had bet for us at the beginning of this season, even though i had a special feeling about this year. This could be my last season in the highest level of Galicia’s hockey league and i was strongly decided to work hard to achieve the best classification. There was several powerful teams (HC Liceo, A.C Ordenes, Domincos HC, …), all of them designed always to win, and sometimes, hring professional players.

Everybody in my team (H.C. Borbolla) was just thinking in enjoy playing hockey. However, we won almost every match during the first round. We only lost against H.C. Liceo, the best team in my opinion, with some very young player from Argentina and Portugal (the son of Jose Querido, the HC. Liceo Vodafone coach). This first position in the general classification makes us to start dreaming was possible.

Only the champion of Galicia’s hockey league would have access to the “Fase de Ascenso” tournament, which gets access to the 1º National division (the first professional hockey league in Spain, just under the highest category). We had an advantage of 5 points at the last two matches of this season. The  20 of April of 2008, H.C. Borbolla won his first Galicia’s hockey championship.

Two weeks after the Galcia’s championship, we attended “Fase de Ascenso” tournament. There was also three teams more: R.S.T. La Magdalena de Santander, FM Oviedo Roller, Siena Oberena Pamplona. The FM Oviedo Roller was the best team, formed with professional players hired from the “Division de Honor” league and of course, they were playing at home.

H.C Borbolla team

My first goal

Second goal

Finally, we lost the three matches 🙂 but we fought like lions.

It was a great experience about personal effort to improve every day, team cooperation and strong competition.