Bridging Design and Development with Automated Declarative UI Code Generation

Ting Zhou, Yanjie Zhao, Xinyi Hou, Xiaoyu Sun, Kai Chen, Haoyu Wang
{"title":"Bridging Design and Development with Automated Declarative UI Code Generation","authors":"Ting Zhou, Yanjie Zhao, Xinyi Hou, Xiaoyu Sun, Kai Chen, Haoyu Wang","doi":"arxiv-2409.11667","DOIUrl":null,"url":null,"abstract":"Declarative UI frameworks have gained widespread adoption in mobile app\ndevelopment, offering benefits such as improved code readability and easier\nmaintenance. Despite these advantages, the process of translating UI designs\ninto functional code remains challenging and time-consuming. Recent\nadvancements in multimodal large language models (MLLMs) have shown promise in\ndirectly generating mobile app code from user interface (UI) designs. However,\nthe direct application of MLLMs to this task is limited by challenges in\naccurately recognizing UI components and comprehensively capturing interaction\nlogic. To address these challenges, we propose DeclarUI, an automated approach that\nsynergizes computer vision (CV), MLLMs, and iterative compiler-driven\noptimization to generate and refine declarative UI code from designs. DeclarUI\nenhances visual fidelity, functional completeness, and code quality through\nprecise component segmentation, Page Transition Graphs (PTGs) for modeling\ncomplex inter-page relationships, and iterative optimization. In our\nevaluation, DeclarUI outperforms baselines on React Native, a widely adopted\ndeclarative UI framework, achieving a 96.8% PTG coverage rate and a 98%\ncompilation success rate. Notably, DeclarUI demonstrates significant\nimprovements over state-of-the-art MLLMs, with a 123% increase in PTG coverage\nrate, up to 55% enhancement in visual similarity scores, and a 29% boost in\ncompilation success rate. We further demonstrate DeclarUI's generalizability\nthrough successful applications to Flutter and ArkUI frameworks.","PeriodicalId":501278,"journal":{"name":"arXiv - CS - Software Engineering","volume":null,"pages":null},"PeriodicalIF":0.0000,"publicationDate":"2024-09-18","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"arXiv - CS - Software Engineering","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/arxiv-2409.11667","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 0

Abstract

Declarative UI frameworks have gained widespread adoption in mobile app development, offering benefits such as improved code readability and easier maintenance. Despite these advantages, the process of translating UI designs into functional code remains challenging and time-consuming. Recent advancements in multimodal large language models (MLLMs) have shown promise in directly generating mobile app code from user interface (UI) designs. However, the direct application of MLLMs to this task is limited by challenges in accurately recognizing UI components and comprehensively capturing interaction logic. To address these challenges, we propose DeclarUI, an automated approach that synergizes computer vision (CV), MLLMs, and iterative compiler-driven optimization to generate and refine declarative UI code from designs. DeclarUI enhances visual fidelity, functional completeness, and code quality through precise component segmentation, Page Transition Graphs (PTGs) for modeling complex inter-page relationships, and iterative optimization. In our evaluation, DeclarUI outperforms baselines on React Native, a widely adopted declarative UI framework, achieving a 96.8% PTG coverage rate and a 98% compilation success rate. Notably, DeclarUI demonstrates significant improvements over state-of-the-art MLLMs, with a 123% increase in PTG coverage rate, up to 55% enhancement in visual similarity scores, and a 29% boost in compilation success rate. We further demonstrate DeclarUI's generalizability through successful applications to Flutter and ArkUI frameworks.
查看原文
分享 分享
微信好友 朋友圈 QQ好友 复制链接
本刊更多论文
自动生成声明式用户界面代码,架起设计与开发的桥梁
声明式用户界面框架在移动应用开发中得到了广泛采用,它具有提高代码可读性和便于维护等优点。尽管有这些优势,但将用户界面设计转化为功能代码的过程仍然充满挑战且耗费时间。多模态大语言模型(MLLMs)的最新进展表明,从用户界面(UI)设计间接生成移动应用代码是大有可为的。然而,由于无法准确识别用户界面组件和全面捕捉交互逻辑,MLLMs 在这项任务中的直接应用受到了限制。为了应对这些挑战,我们提出了一种自动方法--DeclarUI,它将计算机视觉(CV)、MLLMs 和迭代编译器驱动的优化结合起来,从设计中生成并完善声明式 UI 代码。DeclarUI 通过精确的组件分割、用于模拟复杂页面间关系的页面转换图 (PTG),以及迭代优化,提高了视觉保真度、功能完整性和代码质量。在我们的评估中,DeclarUI 在 React Native(一种被广泛采用的分解式用户界面框架)上的表现优于基准,实现了 96.8% 的 PTG 覆盖率和 98% 的编译成功率。值得注意的是,与最先进的 MLLM 相比,DeclarUI 的性能有了显著提高,PTG 覆盖率提高了 123%,视觉相似性得分提高了 55%,编译成功率提高了 29%。通过在 Flutter 和 ArkUI 框架中的成功应用,我们进一步证明了 DeclarUI 的通用性。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 去求助
来源期刊
自引率
0.00%
发文量
0
期刊最新文献
Promise and Peril of Collaborative Code Generation Models: Balancing Effectiveness and Memorization Shannon Entropy is better Feature than Category and Sentiment in User Feedback Processing Motivations, Challenges, Best Practices, and Benefits for Bots and Conversational Agents in Software Engineering: A Multivocal Literature Review A Taxonomy of Self-Admitted Technical Debt in Deep Learning Systems Investigating team maturity in an agile automotive reorganization
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
现在去查看 取消
×
提示
确定
0
微信
客服QQ
Book学术公众号 扫码关注我们
反馈
×
意见反馈
请填写您的意见或建议
请填写您的手机或邮箱
已复制链接
已复制链接
快去分享给好友吧!
我知道了
×
扫码分享
扫码分享
Book学术官方微信
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术
文献互助 智能选刊 最新文献 互助须知 联系我们:info@booksci.cn
Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。
Copyright © 2023 Book学术 All rights reserved.
ghs 京公网安备 11010802042870号 京ICP备2023020795号-1