Over the past decade, reactive frameworks and languages have become the dominant programming paradigm in front-end web development. In this paradigm, user actions change application state, and those changes propagate reactively to derived state and to the display, reducing the likelihood that various parts of the data model and user-facing view will become out of sync due to programmer error. In this paper, we explore the application of relational programming to the specification and synchronized evolution of model and view across time in response to user input. To that end, we present a reactive Javascript implementation of miniKanren and an integrated reactive programming model oriented towards the challenges of front-end web development.
翻译:过去十年间,响应式框架与语言已成为前端Web开发的主导编程范式。在此范式中,用户行为会改变应用状态,而这些变化以响应式方式传播至派生状态及显示界面,从而降低了因程序员失误导致数据模型各组成部分与用户界面视图之间出现不同步的可能性。本文探讨了如何将关系式编程应用于模型与视图随时间推移、响应用户输入的规范描述及同步演化。为此,我们提出了miniKanren的响应式JavaScript实现方案,并构建了面向前端Web开发挑战的集成式响应式编程模型。