In this paper, we focus on the graphical user interface (GUI) framework called “KSWorld” and the universal docu- ment editor built on top of it. The document editor resembles an Office application suite in its appearance and the feature sets but it is powerful enough for the user to build his own applications.

We also show that the system scales up well to write the universal document editor; about 10,000 lines of code was used to build the framework, the FRP evaluator, the docu- ment model and the document, etc., besides the implemen- tation of the special language created for KSWorld.

We report our experiments to create a GUI framework called KSWorld, which supports an interactive yet declarative man- ner of application writing. The framework embodies direct manipulation, high degree of loose-coupling and time-aware execution derived from the Functional Reactive Program- ming (FRP). We also describe how a universal document editor was developed in this framework.

Yoshiki Ohshima Aran Lunzer Bert Freudenberg Ted Kaehler

Making Applications in KSWorld

• The construction of graphical widgets.

yoshiki@vpri.org, aran@acm.org, bert@freudenberg.de, ted@vpri.org

• The connections between events and actions.

The first item on the list is to connect the events to more events to actions. In the LWorld, we implemented and used an event system that was derived from the Announcements Event mechanism [1], which is essentially a traditional observer pattern. In the LWorld, a handler that is installed to a Box to provide a customized behavior, say for a button, defines distinct methods for each kind of the user input events (such as buttonDown:, buttonUp, pointerMotion, etc.) and each of such methods is invoked as a callback. The problem was the method had a mixture of code concerning the

The fields, or slots, of graphical widgets in KSWorld are reactive variables. Definitions of such variables can be added or modified in a localized manner, allowing on-the-fly cus- tomization of the visual and behavioral aspects of widgets and entire applications. Thus the KSWorld environment sup- ports highly exploratory application building: a user con- structs the appearance interactively with direct manipula- tion, then attaches and refines reactive variable definitions to achieve the desired overall behavior.

Viewpoints Research Institute

own GUI framework called LWorld [8]. From the experi- ence, we identified that the code we’ve written falls under three major categories:

Abstract

Figure 1.

The Frank Document Editor.

1. introduction

• Specifying the layout of such widgets.

The software for today’s personal computing environments has become so complex that no single person can understand an entire system: a typical desktop OS and commonly used application suite amount to over 100 million lines of code. Our group’s early experiences with personal computing led us to understand that much of this complexity is “accidental”, rather than inherent. In the STEPS project we therefore explored how to reduce such accidental complexity in software, setting as our domain of interest the entire personal computing environment [3].

We had an earlier version of the same application called the “Frank” Document Editor, written in Smalltalk with our