mercredi 22 juillet 2009

A plead for a SSB generator and execution environement for Gnome

This paper describes a proposed solution for a SSB system aimed at the Gnome Desktop. Having various web applications more tightly integrated within the user desktop would be a step toward the unification of the web and the native world.

What is an SSB ?

dixit Wikipedia : '
A site-specific browser (SSB) is a software application that is dedicated to accessing pages from a single source (site) on a computer network such as the Internet or a private intranet. SSBs typically simplify the more complex functions of a web browser by excluding the menus, toolbars and browser chrome associated with functions that are external to the workings of a single site.
'
What are the benefits of an SSB compared to standard browsing ?

  • Space fully dedicated to web application content
  • System integration (application launcher, notifications, menu, icon badges, local storage...)
  • Standard windows' interaction, being handled by the WM/Shell
Existing Solutions
The SSB approach is already applied by several solutions, with diferents objectives and technical directon :
  • Mozilla Prism : firefox extension allowing the creation of a SSB from the currently browsed web page. Of course, the execution environnement is built around Gecko.
  • Fluid : standalone SSB creator and Webkit based execution environment with system integration (dock icon badges, Growl notification) and some goodies (userscripts, custom CSS)
  • Adobe Air : Support application development using standard web technologies, beside Flash content. Embeds WebKit.
Proposed Solution
  • a Webkit based SSB execution environnement, a chromeless WebView providing sytem integration
  • An Desktop entry creator, following http://standards.freedesktop.org/desktop-entry-spec
  • an Epiphany extension creating an SSB from the currently browsed Web App.
Desktop entry creator
  • Generates .desktop file from user-defined values for the URL, the name and icon path of the SSB
  • Provides right arguments to the execution environnement
  • Defaults to Website favicon if no icon specified
Webkit based SSB execution environnement :
  • One process per SSB
  • Chromeless WebView
  • Restricted access to the user-defined Web App domain
  • Each SSB has their own cookie storage
  • Use site specific javascript logic for system integration (ex: get the right value in the DOM for the number of unread messages to be displayed in the notification and/or badge)

System Integration implementation

  • Applications launcher in Gnome menus
  • Icon Badge (ex : number of unread mail)
  • Notification system integration with libnotify using Seed or GtkWebkit DOM bindings ("You've got a mail")
  • Application menu by generating specific GtkBuilder files and linking event using Seed or GtkWebkit DOM bindings
  • Local storage, possibly Google Gears
The project will be hosted on Gitorious and welcome any contribution being code, documentation, or simply advices.
The first draft code will be commited sometime in the next week, the current state being nearly none :)

vendredi 17 juillet 2009

What if GTK+ 4.0 was ... HTML/CSS/Javascript ? Part I

Following recent activities on the GTK theming/graphical overhaul front, this post exposes some of my thoughts on a possible evolution path.
This first part explains some of the current identified short-comings and tries to dress the profile of the ideal UI toolkit. In the next post I'll try to explain the technical possibilities to go further this road.

Nowadays, GTK+ and most of the competing toolkits keeps the user interface creation a developer's affair when the web allows designer and usability experts to directly influence the aspect of the application. This is mainly caused by a steep learning curve and a lake of user friendly authoring tools.
Also recent efforts by the web standards bodies make them very appealing solutions for highly graphic, dynamic and interactive interfaces.

Current State :


GTK+ is the graphical toolkit used by several mainstream software projects. In a non-exhaustive way, we can cite the Gimp, the Gnome Desktop, Firefox and Openoffice.org (in their Linux incarnations).

It provides developers a way to programatically define/design the user interface of their software : where to put a button, a text entry or a selectable list for example.

It is also possible to declaratively define a GTK UI using the Glade editor and the GtkBuilder XML dialect. The coder binds the events generated by the UI elements (or widgets) to «business» code/services.
GTK+ currently misses some features found in more «modern» toolkits like animations support, canvas, free form layout, declarative theming.

GTK+ is built using GObject which bring dynamic object oriented concepts to the old-but-good C without scarifying the ability to easily bind the code to higher level languages like Python or Javascript.
The GObject ecosystem spun a lot of interesting technologies in the form of libraries mostly developed within the Gnome project. To name a few, we can cite the GStreamer multimedia framework, GIO, Avahi, EDS, PolicyKit.
The fact that GTK+ and those services share a common object system makes them easy to integrate in a GTK app, and thus help GTK+ staying relevant.In the same vein, GTK+ UIs can easily be plugged to DBus services.

New efforts to make the theming system more flexible like a CSS theme engine. By this leave flexible layouting on the side.
Some discussion is also going on the future of the metacity theming.

Pros :
  • Multi-platform
  • Community and commercially backed (Red Hat, Novel, Mozilla Foundation)
  • Lots of language bindings
  • Wide range of target system : Nokia Maemo, Moblin, Gnome, OpenMoko...
  • Mature and alive code-base
  • Rich eco-system of GObject libraries (DBus, GStreamer, GIO, Avahi, EDS, PolicyKit...)
  • Enforce a coherence under most linux boxes

Cons :
  • shrinking numbers of contributors
  • Hard to grasp as mainly programatic
  • Lake of "Bling" and usability/artistic freedom : canvas, animation/transition, freeform layout, declarative theming

Summing up, the
ideal UI toolkit would :
  • be multi-platform
  • be community and commercially backed
  • have a lots of language bindings
  • be avalaible on a Wide range of target system
  • have a Mature and alive code-base
  • could benefit from the rich eco-system of GObject libraries
  • enforce a coherence under most linux boxes
  • have a big following, including developers, users, authoring tools
  • be Declarative
  • have very flexible styling and layouting
  • provide advanced graphical capabilities as animation, transformation etc...

But wait... Doesn't
HTML/Javascript/CSS match most, if not all, of these criterias ?