Rapid Application Development with GTK+ Bindings; GUI Programming the Fast Way
An overview of application development options.
Note: This article originally appeared on the IBM DeveloperWorks Web page at http://www.ibm.com/developerworks/opensource/library/os-gtk2/
The C programming language is a fine language that many of us hold dear. But it's not necessarily the right solution for every situation, and it certainly isn't the fastest way to create one of the most common classes of applications today: end-user-oriented graphical user interface (GUI) applications. When you don't care about raw number-crunching power or the ability to directly touch low-level aspects of the machine, suddenly those strengths turn into a hindrance, wasting something very important and expensive - the time of your developers.
For this reason, many different tools were created to help developers concentrate on writing important code instead of fighting with the unnecessarily verbose and bothersome low-level aspects of the language used. Those tools include higher-level languages, integrated development environments (IDEs), and various utilities for shortening and automating common tasks. This article doesn't try to cover all these subjects in depth; instead, it provides an overview of the different options available for when you're using the GTK+-based toolset.
Recognizing the need to work with differing tools, the GTK+ team set out from the beginning to create a library that could be easily and rapidly bindable into other languages. By language bindings, I mean a specific kind of glue that allows one programming language to present a native interface to the programmer while actually delegating all the work to an underlying library written in another language. Here, the same low-level nature of C that makes it a bother to work with also makes it a perfect choice as a basis for those higher-level bindings, because just about everything can talk to C.
A closer look
While the full array of languages in which you can interface with GTK+ is rather vast - with each bindings set being an independent project with its own level of support and completeness (see "Resources" below for details) - there are some that warrant a closer look, either because of their outstanding quality and popularity or just to show how very different languages can be used to program GTK+.
One of the most popular bindings is the Python set, developed by the PyGTK project. Thanks to the exceptional quality of their work as well as the general joy of working with the Python language, PyGTK is one of the most renowned bindings and also the only one so far to be officially included in the core GNOME desktop release. This means that Python has been recognized as good and popular enough to allow applications written in PyGTK (as well as the PyGTK itself) into GNOME proper instead of being treated as a third-party component. Of course, that doesn't mean other bindings aren't good, but if you enjoy working with Python, you're sure to like PyGTK as well.
Besides the basic set of GTK+ libraries, Python has full coverage of the GNOME development platform. So, in writing your applications, you can use all the shared facilities of the GNOME platform, making your development time even more efficient.
comments powered by