一种基于AST的React语法到支付宝小程序语法的转换方案
首发时间:2021-03-30
摘要:随着互联网技术的发展和应用场景的拓展,快速开发功能完备的前端应用,成为了各个企业的核心诉求,基于浏览器引擎的页面前端,无法承载诸如定位、蓝牙、相机、存储等功能,让网页应用开始难以应对。以微信和支付宝app为容器的小程序,则成为了这一解决方案,在带来原生app能力的同时,又带来了媲美网页应用研发的效率和体验。但其学习成本和网页的研发迁移成本,则成为企业转战小程序的一个瓶颈。本论文以AST抽象语法树作为切入点,在react和支付宝小程序各自语法特性的分析研究基础上,提出一种语法转换方案,让react应用的语法特性能够映射为支付宝小程序的对应语法上,使代码能够无缝迁移至小程序,极大降低企业迁移应用的成本。?????
For information in English, please click here
A conversion scheme of React syntax to Alipay applet syntax based on AST
Abstract:With the development of Internet technology and the expansion of application scenarios, the rapid development of fully functional front-end applications has become the core demand of various companies. The front-end of the page based on the browser engine cannot carry functions such as positioning, Bluetooth, camera, storage, etc. Web applications are beginning to struggle. Small programs that use WeChat and Alipay apps as containers have become this solution. While bringing native app capabilities, it also brings efficiency and experience comparable to web application development. However, the cost of learning and the cost of web page R&D migration have become a bottleneck for enterprises to switch to small programs. This paper uses the AST abstract syntax tree as the entry point. Based on the analysis and research of the respective grammatical characteristics of react and Alipay applets, a grammatical conversion scheme is proposed, so that the grammatical characteristics of react applications can be mapped to the corresponding grammar of Alipay applets. Enables seamless code migration to small programs, greatly reducing the cost of enterprise migration applications
Keywords: Computer application technology Abstract Syntax Tree Grammar conversion
基金:
引用
No.****
动态公开评议
共计0人参与
勘误表
一种基于AST的React语法到支付宝小程序语法的转换方案
评论
全部评论0/1000