Introduction to GUI programming with TKScript and FOX

    (5-February-2004). (last change: 16-Mar-2005)

table of contents

Acknowledgements

Introduction

Software development and graphical user interfaces have come a long way since the very first days of 7bit ASCII/ANSI terminal emulators. The great success of the World Wide Web brought a paradigm shift concerning the way applications are being developed. The "explosion" of number crunching power for the average desktop computer in the late 80ies/early 90ies allowed for further abstraction layers to be added to existing (OS) libraries/applications. A large number of scripting and markup languages, mostly designed for special purposes (e.g. text documents, math, databases, (vector)graphics, presentations..), has emerged since then.

While application programming was mainly a "hackers" issue in the 80ies (you need to know a great deal of the underlying hardware and internal OS structures) this has changed a lot by now. Most IDEs shipped today offer some kind of interface designer which lets you insert/position/edit graphical user interfaces. Usually these interface designers will create either source code (and keep the abstract GUI representation private) or emit an XML file storing the GUI setup and names of the event callbacks that can be loaded at runtime using a "C" library (first invented 1998 by Damon Chaplin- afaik).

The "GLADE" XML GUI approach really impressed me by that time (I even hacked around on my own browser + gui toolkit by that time..but I was too unexperienced and the code was too hackish to be continued (p.s.: thanks a lot Mr. B. Horstmann!) but there are a few points that keep me from using "C" or "C++" to write GUIs:

Dinner time

Regarding the history of the Web, SGML/XML and markup languages in general, it is really astonishing that it took almost 7 years since the public opening of the WWW until someone released a browser that was not only capable of displaying HTML pages and providing the "usual" JS+HTML DOM but also offered the possibility to include advanced GUI elements allowing for complex GUI applications like....e.g. a browser :) YOu guessed it, I'm talking of Mozilla which was --afaik-- the first usuable (!) abd publically available browser that also featured a GUI markup language - XUL.

Well and as we all know Microsoft has not slept since then and they also built their own XML "document based" GUI toolkit (XAML and Avalon). While on the one hand it is surely true that they have not invented something really new it is on the other hand also true that they are creating a usuable and (probably working:) solution.....--but: the following issues keep me away from using this toolkit:

Introduction to FXML

After this little history / view on the current situation of GUI application development I'd like to introduce you to my approach to this issue. Having worked with HTML "GUI" programming quiet a bit during the last years I always wanted to have something as easy to use as HTML+JavaScript/PHP/Perl but designed for client applications. While looking at GUI toolkit bindings for traditional scripting languages like e.g. TCL, Perl, Python or PHP I found the following issues:

Hopefully some of you who think I'm re-inventing the wheel may now understand the reasons for this project. Finally, this is distributed in the hope that it will be useful.. What I'm really looking forward to is a kind of HTML like markup language draft from e.g. the W3C staff which is designed as close to XHTML as possible. This markup language should offer the possibility to embed script statements as well as using a more abstract "ID" based message system to separate GUI and script code.

The FXML markup language, as the name implies, is designed close to the FOX toolkit. Nevertheless it is planned to include a kind of stylesheet translator once there is a real public standard for XML GUIs. This "2 stage" approach makes sense since it would otherwise be necessary to mix the FOX dependent code with the parser for a (more complex) XML GUI format.

FXML elements and attributes (29-January-2003)

The following section introduces you to the FOX markup language (FXML). Please note that this project is actively in development so you better check back often. There is no "stable" release available yet but you may find the current test-release quiet usuable already.

comments
Types

Introduction to scripting with TKS+TKFOX

Examples

Final notice: This project is discontinued. It should merely be considered as a proof-of-concept experiment although currently my work focuses on creating a new GUI addon. stay tuned :)


OpenGL is © 1992-2004 by Silicon Graphics and the OpenGL consortium <http://www.sgi.com/software/opengl/license.html
Mozilla is © 1998-2004 The Mozilla Organization / Netscape <http://www.mozilla.org/about/
XAML/Avalon is © 2002-2004 by Microsoft <http://www.microsoft.com
FOX is © 1997-2004 by Jeroen van der Zijp <http://www.fox-toolkit.org>
GLADE is © 1998-2004 by Damon Glade <http://glade.gnome.org>
TKScript, YAC and FXML are © 2001-2004 by Bastian Spiegel <http://tkscript.de>