{"title":"Native cross-platform app development using the SequalsK transpiler","authors":"Dominik Schultes, Larissa Schneider, Tobias Heymann, Franziska Wild","doi":"10.1016/j.infsof.2024.107626","DOIUrl":null,"url":null,"abstract":"<div><h3>Context:</h3><div>Developing two separate versions of an app for iOS and Android requires significant effort. Existing cross-platform development frameworks may reduce this effort, but they also come with tradeoffs such as high tool dependency.</div></div><div><h3>Objective:</h3><div>To avoid the drawbacks of current methods, we introduce a new approach to cross-platform app development, provide the necessary tools, and conduct a thorough evaluation to demonstrate the feasibility of our proposed approach.</div></div><div><h3>Method:</h3><div>The central idea of the new <em>native cross-platform development</em> approach is to actively develop apps in both native programming languages, Kotlin for Android and Swift for iOS, while exchanging considerable parts of the source code in a bidirectional fashion using a deterministic transpiler. As the centerpiece of our proposed development approach, we present such a <em>bidirectional</em> Swift-Kotlin transpiler, called <em>SequalsK</em>. It supports the majority of the important constructs of both languages and is able to generate syntactically and semantically correct Kotlin code out of Swift code <em>and vice versa</em>.</div></div><div><h3>Results:</h3><div>In our evaluation, we determined that SequalsK is the sole existing bidirectional transpiler, distinguishing it from other transpilers that support only one direction. For the Kotlin-to-Swift direction, SequalsK emerges as the premier transpiler, while for the reverse direction, it stands among the top transpilers. Through six distinct case studies, we applied our native cross-platform development approach, showcasing its ability to fulfill all goals. Across each study, we successfully generated fully-functional native Android and iOS apps, achieving significant time savings as up to 86 percent of the source code has to be programmed only once and can be transpiled to the other involved programming language automatically.</div></div><div><h3>Conclusion:</h3><div>At the moment, in particular data structures and business logic can be transpiled successfully. In the future, we expect further improvements by extending the SequalsK transpiler in order to process user-interface parts as well.</div></div>","PeriodicalId":54983,"journal":{"name":"Information and Software Technology","volume":"179 ","pages":"Article 107626"},"PeriodicalIF":3.8000,"publicationDate":"2024-11-26","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Information and Software Technology","FirstCategoryId":"94","ListUrlMain":"https://www.sciencedirect.com/science/article/pii/S0950584924002313","RegionNum":2,"RegionCategory":"计算机科学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"Q2","JCRName":"COMPUTER SCIENCE, INFORMATION SYSTEMS","Score":null,"Total":0}
引用次数: 0
Abstract
Context:
Developing two separate versions of an app for iOS and Android requires significant effort. Existing cross-platform development frameworks may reduce this effort, but they also come with tradeoffs such as high tool dependency.
Objective:
To avoid the drawbacks of current methods, we introduce a new approach to cross-platform app development, provide the necessary tools, and conduct a thorough evaluation to demonstrate the feasibility of our proposed approach.
Method:
The central idea of the new native cross-platform development approach is to actively develop apps in both native programming languages, Kotlin for Android and Swift for iOS, while exchanging considerable parts of the source code in a bidirectional fashion using a deterministic transpiler. As the centerpiece of our proposed development approach, we present such a bidirectional Swift-Kotlin transpiler, called SequalsK. It supports the majority of the important constructs of both languages and is able to generate syntactically and semantically correct Kotlin code out of Swift code and vice versa.
Results:
In our evaluation, we determined that SequalsK is the sole existing bidirectional transpiler, distinguishing it from other transpilers that support only one direction. For the Kotlin-to-Swift direction, SequalsK emerges as the premier transpiler, while for the reverse direction, it stands among the top transpilers. Through six distinct case studies, we applied our native cross-platform development approach, showcasing its ability to fulfill all goals. Across each study, we successfully generated fully-functional native Android and iOS apps, achieving significant time savings as up to 86 percent of the source code has to be programmed only once and can be transpiled to the other involved programming language automatically.
Conclusion:
At the moment, in particular data structures and business logic can be transpiled successfully. In the future, we expect further improvements by extending the SequalsK transpiler in order to process user-interface parts as well.
期刊介绍:
Information and Software Technology is the international archival journal focusing on research and experience that contributes to the improvement of software development practices. The journal''s scope includes methods and techniques to better engineer software and manage its development. Articles submitted for review should have a clear component of software engineering or address ways to improve the engineering and management of software development. Areas covered by the journal include:
• Software management, quality and metrics,
• Software processes,
• Software architecture, modelling, specification, design and programming
• Functional and non-functional software requirements
• Software testing and verification & validation
• Empirical studies of all aspects of engineering and managing software development
Short Communications is a new section dedicated to short papers addressing new ideas, controversial opinions, "Negative" results and much more. Read the Guide for authors for more information.
The journal encourages and welcomes submissions of systematic literature studies (reviews and maps) within the scope of the journal. Information and Software Technology is the premiere outlet for systematic literature studies in software engineering.