SuperGlue: component programming with object-oriented signals

  • Sean McDirmid ,
  • Wilson C. Hsieh

ECOOP |

Published by Springer Verlag

The assembly of components that can handle continuously changing data results in programs that are more interactive. Unfortunately, the code that glues together such components is often difficult to write because it is exposed to many complicated event-handling details. This paper introduces the SuperGlue language where components are assembled by connecting their signals, which declaratively represent state as time-varying values. To support the construction of interactive programs that require an unbounded number of signal connections, signals in SuperGlue are scaled with object-oriented abstractions. With SuperGlue’s combination of signals and objects, programmers can build large interactive programs with substantially less glue code when compared to conventional approaches. For example, the SuperGlue implementation of an email client is around half the size of an equivalent Java implementation.

Component Programming with Object-Oriented Signals

This talk presents a component glue code language called SuperGlue. Components in programs with interactive processing requirements, such as user interface programs, often interact by continuously viewing each others’ volatile state. These kinds of interactions are difficult to express in most programming languages because the event handling code that reacts to changes in state is very repetitive. SuperGlue eliminates this repetitive glue code with time-varying value abstractions known as signals, which encapsulate event handling details through a standardized interface for communicating volatile state. The way signals are connected between components is analogous to how methods undergo virtual dispatch in object-oriented languages: programmers write rules that specify how an object’s signals are connected according to its type and how it is connected to other objects. With this programming model, complicated component interactions can be concisely expressed in SuperGlue code. For example, the implementation of an email client in SuperGlue is substantially less complicated than a comparable implementation in Java. This talk will motivate and describe SuperGlue through examples, demonstrations of a prototype implementation, and a comparison-based evaluation with conventional programming languages.