skip to main content
10.1145/2892664.2892665acmotherconferencesArticle/Chapter ViewAbstractPublication PagesmodularityConference Proceedingsconference-collections
research-article

Reactive object queries: consistent views in object-oriented languages

Published: 14 March 2016 Publication History

Abstract

Maintaining consistency between data throughout a system using scattered, imperative code fragments is challenging. Some mechanisms address this challenge by making data dependencies explicit. Among these mechanisms are reactive collections, which define data dependencies for collections of objects, and object queries, which allow developers to query their program for a subset of objects. However, on their own, both of these mechanisms are limited. Reactive collections require an initial collection to apply reactive operations to and object queries do not update its result as the system changes. Using these two mechanisms in conjunction allows each to mitigate the disadvantage of the other. To do so, object queries need to respond to state changes of the system. In this paper, we propose a combination of both mechanisms, called reactive object queries. Reactive object queries allow the developer to declaratively select all objects in a program that match a particular predicate, creating a view. Additionally, views can be composed of other views using reactive operations. All views are automatically updated when the program state changes. To better integrate with existing imperative systems, we provide fine-grained events signaling view updates. We implemented the proposed concepts in JavaScript. Our initial experience with example applications shows that the combined concept eases the integration of reactive mechanisms with object-oriented environments by avoiding scattered update code.

References

[1]
S. Bilas. A data-driven game object system. Talk at the Game Developer Conference (GDC) http://gamedevs.org/uploads/ data-driven-game-object-system.pdf, 2002.
[2]
S. Ceri and J. Widom. Deriving production rules for incremental view maintenance. In Proceedings of the International Conference on Very Large Databases (VLDB), 1991.
[3]
T. Felgentreff, A. Borning, R. Hirschfeld, J. Lincke, Y. Ohshima, B. Freudenberg, and R. Krahn. Babelsberg/js - a browser-based implementation of an object constraint language. In Proceedings of the European Conference on Object-oriented Programming (ECOOP). Springer, 2014.
[4]
R. Hirschfeld, P. Costanza, and O. Nierstrasz. Context-oriented programming. Journal of Object Technology (JOT), 2008.
[5]
G. Kiczales, J. Lamping, A. Mendhekar, C. Maeda, C. Lopes, J.-M. Loingtier, and J. Irwin. Aspect-oriented programming. In Proceedings of the European Conference on Object-oriented Programming (ECOOP). Springer, 1997.
[6]
J. Lincke, M. Appeltauer, B. Steinert, and R. Hirschfeld. An open implementation for context-oriented layer composition in contextjs. Journal of Science of Computer Programming (SCP), 2011.
[7]
J. Lincke, R. Krahn, D. Ingalls, M. Röder, and R. Hirschfeld. The lively partsbin–a cloud-based repository for collaborative development of active web content. In Proceedings of the Hawaii International Conference on System Science (HICSS). IEEE, 2012.
[8]
I. Maier and M. Odersky. Higher-order reactive programming with incremental lists. In Proceedings of the European Conference on Object-oriented Programming (ECOOP). Springer, 2013.
[9]
L. A. Meyerovich, A. Guha, J. Baskin, G. H. Cooper, M. Greenberg, A. Bromfield, and S. Krishnamurthi. Flapjax: a programming language for ajax applications. In Proceedings of the ACM SIGPLAN Conference on Object-oriented Programming, Systems, Languages, and Applications (OOPSLA). ACM, 2009.
[10]
T. Rothamel and Y. A. Liu. Generating incremental implementations of object-set queries. In Proceedings of the International Conference on Generative Programming and Component Engineering (GPCE). ACM, 2008.
[11]
G. Salvaneschi and M. Mezini. Reactive behavior in object-oriented applications: an analysis and a research roadmap. In Proceedings of the International Conference on Aspect-oriented Software Development (AOSD). ACM, 2013.
[12]
C. Schuster. Reification of execution state in javascript, 2012.
[13]
D. Willis, D. J. Pearce, and J. Noble. Efficient object querying for java. In Proceedings of the European Conference on Object-oriented Programming (ECOOP). Springer, 2006.
[14]
D. Willis, D. J. Pearce, and J. Noble. Caching and incrementalisation in the java query language. In Proceedings of the ACM SIGPLAN Conference on Object-oriented Programming, Systems, Languages, and Applications (OOPSLA). ACM, 2008.

Cited By

View all
  • (2020)Dependency Graph-based Reactivity for Virtual Environments2020 IEEE Conference on Virtual Reality and 3D User Interfaces Abstracts and Workshops (VRW)10.1109/VRW50115.2020.00052(246-253)Online publication date: Mar-2020
  • (2017)Group-Based Behavior Adaptation Mechanisms in Object-Oriented SystemsIEEE Software10.1109/MS.2017.412122434:6(78-82)Online publication date: Nov-2017

Index Terms

  1. Reactive object queries: consistent views in object-oriented languages

      Recommendations

      Comments

      Information & Contributors

      Information

      Published In

      cover image ACM Other conferences
      MODULARITY Companion 2016: Companion Proceedings of the 15th International Conference on Modularity
      March 2016
      217 pages
      ISBN:9781450340335
      DOI:10.1145/2892664
      Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than the author(s) must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected].

      In-Cooperation

      Publisher

      Association for Computing Machinery

      New York, NY, United States

      Publication History

      Published: 14 March 2016

      Permissions

      Request permissions for this article.

      Check for updates

      Author Tags

      1. Events
      2. Object Queries
      3. Object-oriented Programming
      4. Reactive Collections
      5. Reactive Programming

      Qualifiers

      • Research-article

      Conference

      Modularity '16

      Acceptance Rates

      Overall Acceptance Rate 41 of 139 submissions, 29%

      Contributors

      Other Metrics

      Bibliometrics & Citations

      Bibliometrics

      Article Metrics

      • Downloads (Last 12 months)6
      • Downloads (Last 6 weeks)1
      Reflects downloads up to 14 Feb 2025

      Other Metrics

      Citations

      Cited By

      View all
      • (2020)Dependency Graph-based Reactivity for Virtual Environments2020 IEEE Conference on Virtual Reality and 3D User Interfaces Abstracts and Workshops (VRW)10.1109/VRW50115.2020.00052(246-253)Online publication date: Mar-2020
      • (2017)Group-Based Behavior Adaptation Mechanisms in Object-Oriented SystemsIEEE Software10.1109/MS.2017.412122434:6(78-82)Online publication date: Nov-2017

      View Options

      Login options

      View options

      PDF

      View or Download as a PDF file.

      PDF

      eReader

      View online with eReader.

      eReader

      Figures

      Tables

      Media

      Share

      Share

      Share this Publication link

      Share on social media