SK8

From Wikipedia, the free encyclopedia
SK8
Developer(s) Apple Computer
Stable release 0.9 / 1997
Operating system Mac OS
Type development environment
License open source

SK8 (pronounced "skate") was a multimedia authoring environment developed in Apple's Advanced Technology Group from 1988 until 1997. The two key parts of the SK8 system were Project Builder, an integrated development environment, and the HyperTalk-inspired SK8Script interpreted programming language. Together they produced a system that allowed HyperCard-like ease of construction of arbitrary multimedia programs, like those built using Macromind Director and similar systems. It was described as "HyperCard on steroids".[1]

For reasons that are not well recorded, the SK8 system was never released to the public as an official product. Active development appears to have ended in the mid-1990s, and the Macintosh Common Lisp source code for the entire project was released to the public in 1997.[2] SK8 is not nearly as well known as Apple's other cancelled programming environments like Dylan or ScriptX, and is typically mentioned only in passing.

History

The SK8 project was created by Ruben Kleiman when he joined Apple in 1987. He came to Apple wishing to develop a flexible, object-oriented user interface and multimedia development environment which could create programs visually.[3] The name of the project probably derived from his interest in skateboarding.[4] HyperCard, with its direct manipulation interface and scripting language, was about to ship. While HyperCard was great for simple applications it used a limited interaction model - the "stacks" of cards" - that limited its potential applicability. SK8 attempted to extend these benefits to a wider programming role.[3]

Kleiman's first efforts along these lines were an object system, MacFrames, a frame/object system. Through preferences settings, MacFrames was used to emulate a large variety of object systems, including IntelliCorp's KEE. This research, in concert with users developing actual applications and prototypes at Apple, yielded the object model used in SK8.[3]

The early SK8 graphics system used a metaphor slightly extending HyperCard, allowing cards to have multiple layers rather than a single "background" template. Around this time, the original version of SK8Script, a prototype for the first specification of the AppleScript language, was extended to a fully object-oriented scripting language based on the SK8 object model. A number of researchers in the Advanced Technology Group began to use SK8 for their projects. Certain universities and corporations also began to participate.[3]

In 1992 and 1993 SK8 was re-implemented from the ground up using a customized version of Macintosh Common Lisp (MCL). The graphical library and event systems were re-designed to use a containment approach, with graphical objects "containing" other objects in a hierarchy. The SK8Script debugger was completed and the compiler and runtime performance improved. An object store was added to the system. The SK8 Project Builder was created to provide a very rich set of direct manipulation tools, including tools for building interactive controls (sliders and knobs).[3]

One of the major uses of the SK8 system was by Apple's QA group to create an automated black-box testing system. The system was used to develop prototypes for Newton, QuickTime interfaces, interprocess communication, and was used to prototype many titles, including Stagecraft, a learning tool for children.

Description

The SK8 system consists of three major parts, the SK8Script language and associated basic objects, the Project Builder development environment, and the Stage and Actor system providing multimedia support.

Project Builder

SK8's Project Builder used custom windows and widgets, and did not look like any other IDE.

Project Builder was the SK8 development environment, providing code editing, debugging, runtime support and a graphical interface builder system. A key element of the Builder system was the "Overviewer" panel, which held a categorized list of all of the objects in the currently opened project. These include libraries, user-created functions and methods, variables, and so forth.[5] These could be examined and edited by double-clicking on them, or by clicking in an associated pop-up menu that appeared on the object when it was selected in the GUI builder.[6] The Object Editor that appeared listed the object's "properties" (instance and class variables) in one pane, and it's "handlers" (methods) in another.[7]

The GUI builder included a drag-and-drop based system for constructing visual objects.[8] SK8 did not have standard windows as addressable objects, and used a separate "Stage" object to handle some window-like tasks (more on this later). SK8 did, however, include a system for editing and programming complete menu bars, a feature that HyperCard lacked. Another oft-requested feature from HyperCard was a media editor, which allowed Macintosh resources to be moved in and out of the project. SK8 built this functionality into the IDE. Other components of the system included an online documentation system, lists of systemwide objects and commands, and the code editor and debugger windows.[9]

SK8Script

SK8Script could be through of either as a prototype-based programming language with a HyperTalk-like syntax, or a version of HyperTalk with features added to support complete object-oriented programming.

HyperCard's "universe" was limited to cards, background, stacks and the handful of GUI objects that could appear on them (buttons, text fields, etc.) This meant the HyperTalk language could be tuned to cover this limited universe of objects, allowing it to offer a flexible and verbose syntax that was easy to read and write. Other HyperCard-inspired systems like AppleScript, often faced problems when they tried to apply the same design to a wider selection of objects, or all the objects in the system. AppleScript, for instance, is widely derided as a "read-only language".[10]

A key concept in HyperTalk was the concept of "chunking", which allowed objects to be navigated among and selected to using a simple and universal syntax. For instance, to retrieve the text typed into a text field on a card, one might use the HyperText code put card field 1 into theText. This same syntax also applied to compound objects that could be walked down to find the data one wished to retrieve; HyperTalk scripts often contained code like put the first character of the second word of the first text field of card "Start" into thatChar.

SK8 shared the same basic syntax as HyperTalk, including the limited set of objects and the navigational way that objects were addressed in code. SK8 expanded on HyperTalk with the addition of several new chunking commands (like before and after), additional syntactic sugar (like adding apostrophes in isn't), and making certain commands that applied only in specific cases within HyperCard to become generic (the).[11] HyperTalk was easy to use but had several well-known oddities in its syntax, SK8 generally fixed these problems.

A more radical change was the introduction of typed variables. In HyperTalk all variables were stored as strings, and cast into a small number of other supported types invisibly and on demand. SK8 retained weak typing in the language, but could store any number of different types internally, both basic types like strings and numbers, as well as object references, arrays and other collections. SK8 also offered the optional ability to cast or specify types explicitly in order to catch errors, so one could use the code myInt (an Integer) = 3 which would then cause warnings to appear if myInt was later referred to as if it were a string.[12]

Further, SK8Script offered the ability to create new objects using the prototype-based concept. This creates new objects by copying existing ones, then modifying them as needed.[13] Copies of the new objects will gain those modifications, producing an effect not unlike subclassing, but without any formal declaration of classes or inheritance. This modification process takes place at runtime, not compile time, another difference with traditional OO languages. The prototype concept is used by a number of modern scripting languages, such as JavaScript.[14]

In HyperCard, scripts were stored in text fields within the objects in the GUI. For instance, the script for a button on the screen would be stored within that button inside HyperCard's persistent object store. In SK8, based on MCL, scripts were essentially global, and had to be uniquely named. In order to capture events from the right objects within the system, SK8 added syntax to define which objects the messages should be applied to. For instance, to capture messages setting the value of a property, SK8's version of a setter, one might use code like on set score of me (a Player1) to newValue, which would trigger when someone used set the score of thePlayer to 100.[15]

Actors and the Stage

HyperCard worked within a universe made up of cards and stacks. SK8's universe was made up of a multimedia-oriented system using Actors on a Stage.

Actors were any objects that were based on the prototype Actor object, which contained the basic framework needed to provide 2D graphics support - the location and size of the object for instance. Actors became visible when they were placed upon the Stage, a window-like object that captured user events to provide interactivity. When an Actor was on the Stage, it was considered to be a Window object,[16] although the terminology is inexact - these were not windows in the traditional GUI meaning of the term. A typical Actor might be the Oval object, which drew an oval when placed on the Stage. The Oval would inherit basic functionality from Actor, including a design-time interactive editor system known as the "halo" which provided resize handles and similar widgets.[17]

All SK8 Actors could contain other actors, which led to a truly hierarchical graphics system.[18] The hierarchy could be navigated using the chunking expressions, so one could set the visible of the first Rectangle in CoolOval to true. The objects could then be made visible in the UI by moving them onto the Stage using the insert command, like insert CoolOval into the stage, which would make both the oval and rectangle appear.[19]

GUIs were constructed solely from Actors. Making a window-like display started with a Rectangle object placed on the Stage and sized to whatever was required. Building out typical GUI interaction widgets was done manually - a window title bar was created by adding another Rectangle within the first, then sizing and moving it into the proper location.[6] Every Actor's drawing style was controlled by a Renderer, which aided the GUI building process. For instance, the BevelRenderer could be used bevel the edges around an Actor, producing an effect like Windows 3.x controls or the title bar in NeXTSTEP. Other renderers included color and image fills, gradients, tiles and blends.[20] Although there was no difference in programming terms, basic objects like rectangles were classified "geometry actors" while more traditional GUI elements like buttons were known as "interface actors".[21]

The Stage captured user-generated events like mouse-down clicks and key presses and sent them to the Actors. The visual hierarchy determined with object would receive the message first - the Stage was Z-ordered and objects closer to the front got the messages first. Messages could be passed up the class/prototype hierarchy with the do inherited command.[15]

Interacting with the System

SK8Script offered a system for calling in and out of operating system functions, allowing it to more directly interact with the Macintosh Toolbox. In HyperCard, interacting with arbitrary Toolbox code was handled through custom code resources known as XCMDs and XFCNs which encapsulated the functionality in a black box. These were called and returned in a single operation, with the internal operations invisible. Under SK8, SK8Script could interact directly with the encapsulated code, setting variables, calling functions and returning results. External code could also call into SK8Script, examining and setting variables, or calling functions.[22]

References

Citations
  1. Spohrer 1998, SK8.
  2. According to the date in the license bundled with the User Guide.
  3. 3.0 3.1 3.2 3.3 3.4 Apple 1995, SK8 History.
  4. The application splash screen prominently features a skateboard.
  5. User 1994, p. 11.
  6. 6.0 6.1 User 1994, p. 12.
  7. User 1994, p. 15.
  8. User 1994, p. 20.
  9. User 1994, Chapter 4.
  10. "Read Only Language", Portland Pattern Repository's Wiki
  11. User 1994, p. 104.
  12. User 1994, p. 154.
  13. User 1994, p. 36.
  14. "Inheritance and the prototype chain". Mozilla Developer Network. Mozilla. Retrieved 6 April 2013. 
  15. 15.0 15.1 User 1994, p. 26.
  16. User 1994, pp. 211-213.
  17. User 1994, pp. 57-61.
  18. User 1994, pp. 203-204.
  19. User 1994, p. 205.
  20. User 1994, pp. 76-84.
  21. User 1994, p. 4.
  22. User 1994, Chapter 19.
Bibliography
Related patents
Further reading

External links

This article is issued from Wikipedia. The text is available under the Creative Commons Attribution/Share Alike; additional terms may apply for the media files.