Skip Links

Network World

The Revolution will be programmed, Part 1

Mark's rating: 0
Your rating: None Average: 4.8 (4 votes)

When someone describes someone else as "long in the tooth" you know what they mean: That the target of the soubriquet is getting on in years.

OK, but do you know where that phrase comes from? The answer is from the horse world: Horses' teeth grow throughout their lives and, despite getting worn down by chewing hay and such, horses show progressively more enamel as they age. Thus, you can roughly tell the age of a horse from how "long in the tooth" it is. Now you know.

Anyway, should you also be "long in the tooth" you'll remember a programming system called "HyperCard."

Created for Apple Computer and released in 1987, HyperCard was the first "hypermedia" system, a term coined for a hyperlinked collection of various forms of media (text, video, audio and so on) that creates a non-linear multimedia presentation; what are essentially complex, engaging rat holes of content that can suck you into their yawning limbo for hours on end. In other words, exactly what the Web has become.

HyperCard also had its own language called HyperTalk, which eventually evolved into Apple's AppleScript.

HyperTalk had an almost English-like, chatty quality described in that classic of hacker literature, the Jargon File under the heading "candygrammar."

The Jargon File explains candygrammar as "a programming-language grammar that is mostly syntactic sugar … The usual intent of such designs is that they be as English-like as possible, on the theory that they will then be easier for unskilled people to program."

The File continues: "This intention comes to grief on the reality that syntax isn't what makes programming hard; it's the mental effort and organization required to specify an algorithm precisely that costs. Thus the invariable result is that 'candygrammar' languages are just as difficult to program in as terser ones, and far more painful for the experienced hacker."

We'll revisit the candygrammar issue a little later, but for now here's an example of HyperTalk programming from the  Wikipedia entry to give you a flavor of the language:

on mouseUp
    put "100,100" into pos
    repeat with x = 1 to the number of card buttons
        set the location of card button x to pos
        add 15 to item 1 of pos
    end repeat
end mouseUp

Pretty chatty, eh? Anyway, HyperCard was a groundbreaking concept and existed as a product for sale until 2004, the year it was officially terminated (it had not been updated for some years).

The importance of HyperCard in computer and Internet history cannot be underestimated: For example, Ward Cunningham, considered to be the father of Wiki, contends that a HyperCard stack he wrote in the late 1980s was the genesis of the whole Wiki concept.

I don't have the space (or patience) to delve into the rest of the labyrinthine history of HyperCard and HyperTalk here but, suffice it to say, pretty much everything to do with both was either groundbreaking or just plain cool and, thus, was a legend born.

A derivative of HyperCard was a product called MetaCard, which has been described as "a cross-platform, commercial GUI toolkit."

Metacard was acquired by a Scottish company, Runtime Revolution, in 2003, and they re-engineered it to become the product that we'll be taking a close look at in the next column or two: Runtime Revolution.

Revolution is a complete rapid application development system that includes a graphical IDE and debugger with cross-platform support for Windows, OS X and Linux.

At the heart of Revolution is a HyperTalk-like language that is object-oriented and event driven. This means that Revolution applications are driven by events such as "key down" or "mouse over" that are associated with objects such as buttons and text fields. System events are also generated by, for example, the start of a Revolution application or a timer.

These events are captured by a hierarchy of event handlers (I'll explain the hierarchy in a subsequent piece), which contain scripts. These handler scripts can do all of the normal things programs do (such as access files and databases and write to the display), but they can also handle event data (such as the result of a key press) and can, in turn, generate their own events.

By now you are probably all kinds of excited by the idea of Revolution but you'll have to wait for next week's Gearhead for the next exciting episode as I've run out of space.

Our Commenting Policies