arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 1701.08119cs.PL
收藏

Application Embedding:一种声明式Web编程的语言方法

Application Embedding: A Language Approach to Declarative Web Programming

David H. Lorenz, Boaz Rosenan

摘要:

从Web的早期开始,Web应用程序开发人员就渴望以声明方式开发他们的大部分应用程序。然而,应用程序的一个方面,即它的业务逻辑,总是保持必要性。在这项工作中,我们提出了应用程序嵌入,一种新的方法,应用程序开发,允许应用程序的各个方面,包括其业务逻辑,以声明方式编程。我们在两个步骤中开发这种方法。首先,我们在Web应用程序和特定领域语言(DSL)之间绘制一个映射。其次,我们注意到,在实现DSL的两种方法中,即内部或外部,大多数传统的Web应用程序对应于外部DSL,而对应于DSL嵌入(实现内部DSL)的技术大多未被探索。通过将DSL嵌入技术投射到Web应用中,我们得到了一种新的技术--应用嵌入。应用程序嵌入提供了代码资产的分离,鼓励重用命令式代码,同时保持所有特定于应用程序的资产,包括那些指定其业务逻辑的声明性资产。作为验证,我们使用所提出的资产分离实现了一个简单但不平凡的Web应用程序。此实现包括一个名为FishTank的应用程序不可知的命令式主机应用程序,旨在适用于各种Web应用程序,以及旨在加载到该主机上的特定应用程序的不同方面的声明性定义。与传统方法相比,我们的代码资产分离方法有助于更好地分离工作。通过这种分离,主机应用程序开发人员可以主要关注web应用程序的功能外方面,即提高性能、可伸缩性和可用性,而嵌入式应用程序的开发人员可以关注其应用程序的功能方面,而无需担心功能外的问题。主机应用程序的可重用性使得投入到更好的实现中的努力具有成本效益,因为它可以使构建在其上的所有应用程序受益。

英文摘要:

Since the early days of the Web, web application developers have aspired to develop much of their applications declaratively. However, one aspect of the application, namely its business-logic is constantly left imperative. In this work we present Application Embedding, a novel approach to application development which allows all aspects of an application, including its business-logic, to be programmed declaratively. We develop this approach in a two-step process. First, we draw a mapping between web applications and Domain-Specific Languages (DSLs). Second, we note that out of the two methods for implementing DSLs, namely as either internal or external, most traditional web applications correspond to external DSLs, while the the technique that corresponds to DSL embedding (implementing internal DSLs) is left mostly unexplored. By projecting the well-known technique of DSL embedding onto web applications, we derive a novel technique--Application Embedding. Application embedding offers a separation of code assets that encourages reuse of imperative code, while keeping all application-specific assets, including those specifying its business- logic, declarative. As validation, we implemented a simple, though nontrivial web application using the proposed separation of assets. This implementation includes an application-agnostic imperative host application named FishTank, intended to be applicable for a wide variety of web applications, and a declarative definition of the different aspects of the specific application, intended to be loaded on that host. Our method of separation of code assets facilitates a better separation of work, in comparison to traditional methods. By this separation, host application developers can focus mostly on the extra-functional aspects of a web application, namely on improving performance, scalability, and availability, while developers of an embedded application can focus on the functional aspects of their application, without worrying about extra- functional concerns. The reusability of the host application makes the effort put into a better implementation cost-effective, since it can benefit all applications built on top of it.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑