skip to main content
article

Query-based object-oriented programming: a declarative web of objects

Published:06 April 2020Publication History
Skip Abstract Section

Abstract

We present a declarative, object-oriented language in which queries play a central role. Queries are used not only to access data, but also to refer to the application’s object members and as a means of program control. The language is fully declarative, with queries and other pure functions defining the relations between the attributes of different objects. A rule-base-like write operation allows state to be updated. Control is achieved by queries selecting the class variants (mixin classes) which are active in each object. The dynamic activation and deactivation of declarative mixin classes allows decomposition of functionality into small reusable classes.

The programming style in the language is functional and reactive, with function applications defining object members. Queries are one type of function, which also serves as the glue which puts these functions together, providing them with their input. Since queries describe declaratively what they return, they leave it to the system to implement the how of getting it. Combining this with an organization around objects makes the language highly suitable for complex interactive applications driven by large amounts of data from multiple sources.

Our implementation of the language includes a strong display component. It can be seen as a conceptual extension of HTML and CSS in a way which replaces the need for the JavaScript imperative component in web applications. The work described here is not restricted, however, to front-end development and can be applied elsewhere as well.

References

  1. Peter Alvaro, William R Marczak, Neil Conway, Joseph M Hellerstein, David Maier, and Russell Sears. 2011. Dedalus: Datalog in time and space. In Datalog Reloaded, O. de Moor, G. Gottlob, T. Furche, and A. Sellers (Eds.). Springer, 262-281. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. Greg J Badros, Alan Borning, Kim Marriott, and Peter Stuckey. 1999. Constraint cascading style sheets for the web. In Proceedings of the 12th annual ACM symposium on User interface software and technology. ACM, 73-82. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. Greg J Badros, Alan Borning, and Peter J Stuckey. 2001. The Cassowary linear arithmetic constraint solving algorithm. ACM Transactions on Computer-Human Interaction (TOCHI) 8, 4 (2001), 267-306. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. Engineer Bainomugisha, Jorge Vallejos, Coen De Roover, Andoni Lombide Carreton, and Wolfgang De Meuter. 2012. Interruptible context-dependent executions: a fresh look at programming context-aware applications. In Proceedings of the ACM international symposium on New ideas, new paradigms, and reflections on programming and software. ACM, 67-84. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. Pascal Costanza and Robert Hirschfeld. 2005. Language Constructs for Context-oriented Programming: An Overview of ContextL. In Proceedings of the 2005 Symposium on Dynamic Languages (DLS '05). ACM, New York, NY, USA, 1-10. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. Maja D'Hondt. 2004. Hybrid aspects for integrating rule-based knowledge and object-oriented functionality. Ph.D. Dissertation. PhD thesis, Vrije Universiteit Brussel.Google ScholarGoogle Scholar
  7. Chris Granger, Joshua Cole, Corey Montella, and Jamie Brandon. 2017. Eve: Better Tools for Thought. (2017). https://github.com/witheve.Google ScholarGoogle Scholar
  8. Todd J Green, Shan Shan Huang, Boon Thau Loo, Wenchao Zhou, et al. 2013. Datalog and recursive query processing. Foundations and Trends® in Databases 5, 2 (2013), 105-195. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. Ernest Friedman Hill. 2003. Jess in action: Java rule-based systems. Manning Publications Co. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. Tetsuo Kamina, Tomoyuki Aotani, and Hidehiko Masuhara. 2016. Generalized layer activation mechanism for context-oriented programming. In Transactions on Modularity and Composition I, S. Chiba, M. Südholt, P. Eugster, L. Ziarek, and G. Leavens (Eds.). Springer, 123- 166.Google ScholarGoogle Scholar
  11. Tetsuo Kamina, Tomoyuki Aotani, and Hidehiko Masuhara. 2017. Push-based reactive layer activation in context-oriented programming. In Proceedings of the 9th International Workshop on Context-Oriented Programming. ACM, 17-21. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. Stefan Lehmann, Tim Felgentreff, Jens Lincke, Patrick Rein, and Robert Hirschfeld. 2016. Reactive Object Queries. In Constrained and Reactive Objects Workshop (CROW).Google ScholarGoogle Scholar
  13. Leo A Meyerovich, Arjun Guha, Jacob Baskin, Gregory H Cooper, Michael Greenberg, Aleks Bromfield, and Shriram Krishnamurthi. 2009. Flapjax: a programming language for Ajax applications. In Proceedings of the 24th ACM SIGPLAN conference on Object oriented programming systems languages and applications, Vol. 44. ACM, 1-20. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. Simon L. Peyton Jones and Philip Wadler. 1993. Imperative Functional Programming. In Proceedings of the 20th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL '93). ACM, New York, NY, USA, 71-84. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. Gary Riley. 1991. Clips: An expert system building tool. In Proceedings of the Technology 2001 Conference.Google ScholarGoogle Scholar
  16. Yoav Seginer, Theo Vosse, Gil Harari, and Uri Kolodny. 2018 (accessed June 25, 2018). CDL Github repository. https://github.com/cdl-lang.Google ScholarGoogle Scholar
  17. Roel Wuyts. 1998. Declarative reasoning about the structure of object-oriented systems. In Technology of Object-Oriented Languages, 1998. TOOLS 26. Proceedings. IEEE, 112-124. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Query-based object-oriented programming: a declarative web of objects

        Recommendations

        Comments

        Login options

        Check if you have access through your login credentials or your institution to get full access on this article.

        Sign in

        Full Access

        • Published in

          cover image ACM SIGPLAN Notices
          ACM SIGPLAN Notices  Volume 53, Issue 8
          DLS '18
          August 2018
          100 pages
          ISSN:0362-1340
          EISSN:1558-1160
          DOI:10.1145/3393673
          Issue’s Table of Contents
          • cover image ACM Conferences
            DLS 2018: Proceedings of the 14th ACM SIGPLAN International Symposium on Dynamic Languages
            October 2018
            100 pages
            ISBN:9781450360302
            DOI:10.1145/3276945

          Copyright © 2018 ACM

          Publisher

          Association for Computing Machinery

          New York, NY, United States

          Publication History

          • Published: 6 April 2020

          Check for updates

          Qualifiers

          • article

        PDF Format

        View or Download as a PDF file.

        PDF

        eReader

        View online with eReader.

        eReader
        About Cookies On This Site

        We use cookies to ensure that we give you the best experience on our website.

        Learn more

        Got it!