Operational Dynamics
Technology, Strategy, and IT Operations Consulting   |   Open Source Research and Development   |   Blogs

Writing Really Rad GTK and GNOME Applications in C, Python, or Java

The linux.conf.au GTK tutorial, part I

This was first given as the GTK and GNOME tutorial at linux.conf.au, Australia's Linux and Open Source conference, by Andrew Cowie and Davyd Madeley on 18 Jan 2007 at Sydney and again for LCA 2008 at Melbourne.

You can view the slides online here. The source code we wrote live during the presentation is also here in the in the in the in the src/ directory. Video was taken of the 2008 presentation and you can watch via piece A and piece B

A sequel to this tutorial was given as "Part II" by Andrew Cowie at linux.conf.au Hobart in 2009.


Writing Really Rad GTK and GNOME Applications in C, Python, or Java

Abstract

GNOME is the best desktop on the planet, so everyone wants to write applications for it!

Writing GTK programs to work on Linux and other Unix operating systems is actually much easier than common perception would have you believe. The basic concepts involved are fairly straight forward, but the GNOME universe is an extensive one and figuring out where to start can be a bit daunting.

Actually what's involved is:

So we'll go through all this with our audience. Somewhat unexpectedly, we will cover three different programming environments. We will show how its done in C because that's what so many of the existing GNOME programs are written in. The whole problem with C, however is that GNOME programs written in it are verbose and arcane, and without prior Glib/GTK/GNOME programming experience very difficult to debug. The good news is you don't have to work in C if you don't want to. So as a contrast, we'll also present GTK in two other languages: Python and Java.

People justifiably laud Python for the ability to rapidly prototype and implement programs. The same extends into writing GUI programs. Once they understand the underlying GTK concepts, anyone with a basic understanding of Python can quickly have a GUI interface to their script or application.

At the other end of the spectrum is Java. Until now the free desktop world hasn't had too much to do with Java, but huge numbers of computer professionals have experience in Java and they too can do rapid application development of GTK and GNOME applications if they wish. There are powerful tools for writing and debugging applications available; even hard nosed experienced hackers will be surprised to see the impressive level of productivity that can arise when these are brought to bear - and the result are fast, tight applications that are "native" GNOME programs, not some lookalike.

GNOME is about more than just writing software. It's about writing rocking software that is:

Without overwhelming our audience, we'll give a basic overview of what's involved in each of these. We'll quickly run through the landscape of GNOME libraries (just so we can get people focused on the few that will be immediately important), Finally, throughout the tutorial we'll demo lots of examples and to plenty of hands on coding right there.

This tutorial will not try to cover everything, but rather will give people a solid head start down the road of making their own amazing contributions to GNOME.


These documents copyright © 2007-2008 Operational Dynamics Consulting, Pty Ltd unless otherwise noted. Copyright of work by other authors is retained by those authors. Most material in this site is made available under an Open Source or Open Content licence; see the top level LICENCE file in that project's source repository for details

Files on this site (notably program code) will be delivered as Content-Type: text/plain unless syntax-highlighted or binary. Optimized for standards. All times UTC