Query-based object-oriented programming: a declarative web of objects
- 6 April 2020
- journal article
- research article
- Published by Association for Computing Machinery (ACM) in ACM SIGPLAN Notices
- Vol. 53 (8), 64-75
- https://doi.org/10.1145/3393673.3276949
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.Keywords
This publication has 7 references indexed in Scilit:
- Push-based reactive layer activation in context-oriented programmingPublished by Association for Computing Machinery (ACM) ,2017
- Interruptible context-dependent executionsPublished by Association for Computing Machinery (ACM) ,2012
- Datalog and Recursive Query ProcessingFoundations and Trends® in Databases, 2012
- FlapjaxPublished by Association for Computing Machinery (ACM) ,2009
- Language constructs for context-oriented programmingPublished by Association for Computing Machinery (ACM) ,2005
- The Cassowary linear arithmetic constraint solving algorithmACM Transactions on Computer-Human Interaction, 2001
- Constraint cascading style sheets for the WebPublished by Association for Computing Machinery (ACM) ,1999