Sciweavers

ECOOP
2008
Springer

An Extensible State Machine Pattern for Interactive Applications

14 years 1 months ago
An Extensible State Machine Pattern for Interactive Applications
Abstract. The state design pattern is the standard object-oriented programming idiom for implementing the state machine logic of interactive applications. While this pattern provides a number of advantages, it does not easily support the creation of extended state machines in subclasses. We describe the extensible state design pattern, which augments the traditional state pattern with a few additional constraints that allow subclasses to easily add both new states and new events. Further, we observe that delimited continuations, a well-known construct from functional programming languages, supports state refinement in subclasses as well as the modular expression of control flow in the presence of interaction. We illustrate our pattern in the context of Java, leveraging its generics to obviate the need for dynamic typecasts and employing a small library that implements delimited continuations. We have used our pattern to simplify and modularize a widely used application written by other...
Brian Chin, Todd D. Millstein
Added 19 Oct 2010
Updated 19 Oct 2010
Type Conference
Year 2008
Where ECOOP
Authors Brian Chin, Todd D. Millstein
Comments (0)