Reprogrammable Interactive Software as a Declarative Data Structure
Varv is a programming model for writing inherently extensible software using a structured declarative representation. We believe software should be malleable and extensible by default. Writing extensible software should not require careful design and architecture choices by software creators and extending existing software should not necessitate sophisticated knowledge of application architecture or development environments from end-users.
Varv obviates the need for software creators to carefully design and craft extension mechanisms by embracing accretive extensibility at the language level. Any Varv program can be extended or modified with new features or capabilities without changing the original source code. Extensibility is built into the language itself. Varv reduces the barrier to entry for end-users to modify software by providing a consistent extensibility interface across all Varv programs. In addition the use of a declarative programming representation is well suited for targeting by higher-level authoring tools.
Varv and its ancillary authoring and debugging tools are in alpha but can already be used to write various interactive applications.
To get started writing your own applications in Varv check out some of the following documentation:
- Examples: A collection of example Varv applications.
- Tutorial: An introduction to Varv and how to write your own applications in Varv.
- User Guide: In depth guide to key concepts in Varv.
- Usage: A guide on how to setup Varv to use it on a Webstrates server.
- Reference: Documentation generated for the Varv engine, including descriptions of all standard triggers and actions.
Design Goals #
Varv provides a new vision for software development focused on three design goals.
- Provide a structured declarative representation of interactive software. The declarative representation allows users to focus primarily on composing domain-specific primitives at a higher level of abstraction while deferring execution concerns to the underlying architecture or runtime. Additionally, declarative representations are well suited for integration with higher-level authoring tools.
- Enable accretive extensibility by design. All Varv programs can be extended or modified by adding additional files without changes to existing code. All Varv programs are inherently extensible without necessitating careful design choices at authoring time.
- Decouple application logic from interaction modality. Most programming languages tightly couple input events (e.g., mouse clicks) with resulting state changes (e.g., selecting a game piece). Varv provides mechanisms to decouple application logic from input events, enabling retargeting of an application to multiple interaction modalities or platforms.
Authoring Environment and Architecture #
A diagram of the software stack for the authoring environment, and overall architecture of Varv is shown below.
The foundation of the authoring environment is the Webstrates platform which handles DOM synchronization and persistence. On top of that the Webstrates Package Manager (WPM) enables sharing code between webstrates similar to package managers such as npm for node.js. On top again is codestrates which is a set of WPM packages for executing and editing code. Cauldron is a development and authoring environment built using the functionality provided by codestrates. We have added special functionality to cauldron specific to authoring Varv programs, such as the ability to define Varv concept definition files and inspect instances of Varv concepts in running Varv programs.
On the right side of the diagram is a depiction of the Varv Language’s core architecture, depicting how that various files written in the Varv authoring environment are consumed by the Varv engine. The overall architecture of Varv consists of six main components: the event engine that reads in concept definitions, templates that define how these concepts are rendered in the view layer, and mappings that define where data from concept instances should be stored in the data layer.
Research Paper #
Marcel Borowski, Luke Murray, Rolf Bagge, Janus Bager Kristensen, Arvind Satyanarayan, and Clemens N. Klokmose. 2022. Varv: Reprogrammable Interactive Software as a Declarative Data Structure. In CHI Conference on Human Factors in Computing Systems (CHI ’22), April 29-May 5, 2022, New Orleans, LA, USA. ACM, New York, NY, USA. https://doi.org/10.1145/3491102.3502064.
Read More #
You can read much more about Webstrates on the Webstrates website. You can also see our medium post “A brief overview of Webstrates”. You can read more about the codestrates editor used to implement the custom authoring environment for Varv on the Codestrates website.