Lately, Gnome seems to pay much attention in documentation and apart from the official -and huge- SDK plans, community contributors also help a lot by releasing various docs. This time is Carlos Soriano that printed a detailed guide how we can build extensions in Gnome Shell.
And even if you don’t use Shell (Ubuntu/Mint), you can still continue reading that, because Carlos also wrote some Clutter Apps -that don’t require Gnome Shell to run.
I will skip the details because Carlos explain everything on Step by step tutorial to create extensions @ Gnome Live! Just a small note, on Gameosx.js file, Carlos has made a small error, you have to remove line 295 “};”.
I didn’t try the extension demos, but the just the Clutter ..plus I added some GTK.
Song: Old Remedy | butterfly
You will find the GTK + Javascript samples at:
http://developer.gnome.org/gnome-devel-demos/unstable/beginner.js.html.en
It will be very typical of me to talk again about the advantages of JavaScript + Gnome, so I won’t. But a small tip, if you can avoid GTK for your App (ie a game), then avoid it and write it up completely in Clutter.
JavaScript Patterns
This is the absolute tutorial to learn write JavaScript the “right” way. It introduces the best practices for every problem, and while it targets mostly in Web Development it is also perfect if you want to get it started with Gnome Development.

All the tutorials are written in a very simple way, so even if this is the first time you see a programming language in your life, you won’t have any problem to get into it.
Functions Declaration
/*
Description: creating anonymous functions and assigning them to a variable
*/
// antipattern
function getData() {
}
// preferred
/* Benefits: * 1. Makes it easier to understand "functions as an object". * 2. It enforces good semicolon habits. * 3. Doesn't have much of the baggage traditionally associated with functions and scope. */
var getData = function () { };
// named function expression
/* Benefits: * 1. Provides the debugger with an explicit function name: helps stack inspection. * 2. Allows recursive functions: getData can call itself. * Issues: * 1. there are historic quirks with IE */
var getData = function getData () { };
This is just an example, all the patterns are like these simply explained. Of course the guide goes into the most advanced structures. If you are interested give it a look.
