TML Applicationscopyright © 2000-2001 - Peter MacDonald http://www.browsex.com
The above is a description of TML Applications. TML is a script-like language that imbeds Tcl and is used to generate HTML output. But not just normal HTML, Tk attributed HTML. Since, BrowseX renders HTML by using Tk widgets for form elements, it can overload attributes to access the Tcl options of these widgets. Moreover, TABLEs can be overloaded to put table data into a Tktable widget. using TML as a cgi, allows normal browsers to work as well. In this way, hybrid applications can be written which work both on the Desktop and the World Wide Web.
Running a TML application under BrowseX provides for complex user interaction not practical in normal browsers. Other Tcl advantages such as multi-language support come for free. Used with a regular browser (via the BrowseX Web Portal or the TML CGI) and it acts like an HTML/Web CGI based application. HTML access does give fewer features (ie. a 2 dimensional woodeness) when compared to Tk/Browsex, however it is functional and does give remote access to the application.
The major difference in operation between the two models is that data is manipulated directly under Tcl, whereas under the Web a form submit is required to effect data updates. In other words, Tcl can handle local manipulation of data; other web browsers cannot.
Rolodex is an Address Book written in about 250 lines of TML. Click here to view the source. The purpose of Rolodex is to show that it is possible to write an application that combines the accessabilty of the Web with the usability and power of standalone programs.
TML Applications are possible because of the way Browsex implements web page FORMs using ordinary Tk widgets such as buttons and entries (via Tkhtml). BrowseX takes advantage of this mapping and provides direct access to widgets permitting complex application interaction that is just not practical with regular web programming. Moreover, developers can save time by using HTML for the Tcl layout. Conversely, when used via the Web, all of the basic functionality is still available, but the feel-good, nice-to-have things like instant-feedback are missing.
Note that in both cases, a TML application normally runs inside a SafeTcl interpreter. Special access functions have been provided to allow reading and writing data to/from disk, a database, or the network. In fact, there are actually three different ways of running a TML application.
In the last two modes, the application looks and acts virtually the same. However, in the last case the data is actually stored on a remote server which is accessed vi the web. There are several _tml variables to define which of the various modes we are running in.
Table of Contents
Copyright © 1999-2001 Browsex Systems Inc http://BrowseX.com
TML Source Code For This Page