Responders: Language Support for Interactive Applications

  • Brian Chin
  • Todd Millstein
Part of the Lecture Notes in Computer Science book series (LNCS, volume 4067)


A variety of application domains are interactive in nature: a primary task involves responding to external actions. In this paper, we introduce explicit programming language support for interactive programming, via the concept of a responder. Responders include a novel control construct that allows the interactive logic of an application to be naturally and modularly expressed. In contrast, the standard approaches to interactive programming, based on the event-driven style or the state design pattern, fragment this logic across multiple handlers or classes, with the control flow among fragments expressed only indirectly. We describe ResponderJ, an extension to Java supporting responders. A responder is simply a class with additional abilities, and these abilities interact naturally with the existing features of classes, including inheritance. We have implemented ResponderJ as an extension to the Polyglot compiler for Java. We illustrate ResponderJ’s utility in practice through two case studies: the implementation of a GUI supporting drag-and-drop functionality, and a re-implementation of the control logic of JDOM, a Java library for parsing and manipulating XML files.


Control Logic Emit Statement Interactive Programming Interactive Application Event Handler 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
  2. 2.
    Adya, A., Howell, J., Theimer, M., Bolosky, W., Douceur, J.: Cooperative task management without manual stack management. In: Proc. Usenix Tech. Conf. (2002)Google Scholar
  3. 3.
    Arnold, K., Gosling, J., Holmes, D.: The Java Programming Language, 3rd edn. Addison-Wesley, Reading (2000)Google Scholar
  4. 4.
    Cunningham, R., Kohler, E.: Making events less slippery with EEL. In: HotOS X: Hot Topics in Operating Systems (2005)Google Scholar
  5. 5.
    Dom home page,
  6. 6.
    Gamma, E., Helm, R., Johnson, R.E., Vlissides, J.: Design Patterns: Elements of Reusable Object-Oriented Software. Addison-Wesley, Massachusetts (1995)Google Scholar
  7. 7.
    Gosling, J., Joy, B., Steele, G., Bracha, G.: The Java Language Specification, 2nd edn. The Java Series. Addison-Wesley, Boston (2000)Google Scholar
  8. 8.
    Jdom home page,
  9. 9.
    Knuth, D.: Fundamental Algorithms, 3rd edn. Addison-Wesley, Reading (1997)MATHGoogle Scholar
  10. 10.
    Liskov, B.: A history of CLU. ACM SIGPLAN Notices 28(3), 133–147 (1993)CrossRefGoogle Scholar
  11. 11.
    Liu, J., Kimball, A., Myers, A.C.: Interruptible iterators. In: POPL 2006: Conference record of the 33rd ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, pp. 283–294. ACM Press, New York (2006)CrossRefGoogle Scholar
  12. 12.
    Murer, S., Omohundro, S., Stoutamire, D., Szyperski, C.: Iteration abstraction in Sather. ACM Transactions on Programming Languages and Systems 18(1), 1–15 (1996)CrossRefGoogle Scholar
  13. 13.
    Nystrom, N., Clarkson, M.R., Myers, A.C.: Polyglot: An Extensible Compiler Framework for Java. In: Hedin, G. (ed.) CC 2003 and ETAPS 2003. LNCS, vol. 2622, pp. 138–152. Springer, Heidelberg (2003)CrossRefGoogle Scholar
  14. 14.
    Ousterhout, J.K.: Why threads are a bad idea (for most purposes). In: The 1996 USENIX Technical Conference (January 1996) (Invited talk)Google Scholar
  15. 15.
    PEP 255: Simple generators.
  16. 16.
  17. 17.
    Tarpenning, M.: Cooperative multitasking in C++. Dr. Dobb’s Journal, 16(4):54, 56, 58–59, 96, 98–99 (1991)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2006

Authors and Affiliations

  • Brian Chin
    • 1
  • Todd Millstein
    • 1
  1. 1.University of CaliforniaLos Angeles

Personalised recommendations