Application Embedding: A Language Approach to Declarative Web Programming

D. Lorenz, Boaz Rosenan
{"title":"Application Embedding: A Language Approach to Declarative Web Programming","authors":"D. Lorenz, Boaz Rosenan","doi":"10.22152/programming-journal.org/2017/1/2","DOIUrl":null,"url":null,"abstract":"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. \nWe 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. \nBy 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. \nAs 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. \nOur 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.","PeriodicalId":224558,"journal":{"name":"Art Sci. Eng. Program.","volume":"47 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2017-01-27","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"2","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Art Sci. Eng. Program.","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.22152/programming-journal.org/2017/1/2","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 2

Abstract

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.
应用嵌入:声明式Web编程的一种语言方法
从Web的早期开始,Web应用程序开发人员就渴望以声明式的方式开发他们的大部分应用程序。然而,应用程序的一个方面,即它的业务逻辑,一直是必需的。在这项工作中,我们提出了应用程序嵌入,这是一种应用程序开发的新方法,它允许应用程序的所有方面,包括其业务逻辑,以声明式的方式编程。我们通过两个步骤来开发这种方法。首先,我们绘制了web应用程序和领域特定语言(dsl)之间的映射。其次,我们注意到,在实现DSL的两种方法中,即内部或外部方法,大多数传统的web应用程序对应于外部DSL,而对应于DSL嵌入(实现内部DSL)的技术大部分未被探索。通过将DSL嵌入技术投影到web应用中,我们得到了一种新的技术——应用嵌入技术。应用程序嵌入提供了代码资产的分离,鼓励了命令式代码的重用,同时使所有特定于应用程序的资产(包括那些指定其业务逻辑的资产)保持声明性。作为验证,我们使用提议的资产分离实现了一个简单但不平凡的web应用程序。这个实现包括一个名为FishTank的与应用程序无关的命令式主机应用程序,旨在适用于各种各样的web应用程序,以及对特定应用程序的不同方面的声明性定义,旨在加载到该主机上。与传统方法相比,我们的代码资产分离方法促进了更好的工作分离。通过这种分离,主机应用程序开发人员可以主要关注web应用程序的额外功能方面,即提高性能、可伸缩性和可用性,而嵌入式应用程序的开发人员可以专注于应用程序的功能方面,而不必担心额外的功能问题。主机应用程序的可重用性使得为更好的实现所做的努力具有成本效益,因为它可以使构建在它之上的所有应用程序受益。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 求助全文
来源期刊
自引率
0.00%
发文量
0
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:604180095
Book学术官方微信
小红书