skip to main content
10.1145/3422392.3422426acmotherconferencesArticle/Chapter ViewAbstractPublication PagessbesConference Proceedingsconference-collections
research-article

Improving mobile app development using transpilers with maintainable outputs

Published:21 December 2020Publication History

ABSTRACT

Mobile application developers often target both iOS and Android in an effort to extend their target user base. There are several tools that can aid this development effort, allowing developers to maintain a single codebase for both platforms instead of two. These tools often face a few shortcomings, of which two are noteworthy: they are hard-to-replace dependencies in the codebase, and often present some type of obstacle for integrating platform-independent native code with the shared codebase. The goal of this work is to propose a new approach to creating cross-platform development tools that improves on these two aspects, and to analyze the viability of a real-world implementation of the proposed approach. An analysis of the current state of the practice indicates cross-platform compilers as a promising direction, and a study is made on the common concerns and challenges faced when developing these compilers. Based on these analyses, this work proposes the creation of a compiler that translates one platform's hand-written native code into maintainable native code for the other platform. The feasibility of implementating this approach is tested with the development of a proof-of-concept compiler from Swift to Kotlin. An analysis is made on the readability of the resulting prototype's output code, as well as other relevant metrics. The conclusion is that, while some trade-offs might be necessary, such an approach is viable if applied in an adequate ecosystem.

References

  1. Adobe. [n.d.]. Adobe PhoneGap. Retrieved on 2020-06-15, from https://phonegap. com.Google ScholarGoogle Scholar
  2. P.F. ALBRECHT, P.E. GARRISON, S.L. GRAHAM, R.H. HYERLE, P. IP, and B. KRIEG-BRÜCKNER. 1980. Source-to-source Translation: Ada to Pascal and Pascal to Ada. In Proceedings of the ACM-SIGPLAN Symposium on Ada Programming Language (SIGPLAN '80). ACM, New York, NY, USA, 183--193. https://doi.org/10.1145/948632.948658Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. P. ARRIGHI, J. GIRARD, M. LEZAMA, and K. MAZET. 2014. The GOOL System: A Lightweight Object-oriented Programming Language Translator. In Proceedings of the 9th International Workshop on Implementation, Compilation, Optimization of Object-Oriented Languages, Programs and Systems PLE (ICOOOLPS '14). ACM, New York, NY, USA, Article 5, 7 pages. https://doi.org/10.1145/2633301.2633306Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. T. BALL. 2013. cfront: a J2ObjC Inspiration. Retrieved on 2020-06-15, from http://j2objc.blogspot.com/2013/09/cfront-j2objc-inspiration-developers.html.Google ScholarGoogle Scholar
  5. N. BARTH. 2014. Análise Comparativa de Ferramentas de Desenvolvimento de Aplicativos Móveis Multiplataforma. Bachelor's thesis. Universidade Regional de Blumenau.Google ScholarGoogle Scholar
  6. A. CHARLAND and B. LEROUX. 2011. Mobile Application Development: Web vs. Native. Queue 9, 4, Article 20 (April 2011), 9 pages. https://doi.org/10.1145/1966989.1968203Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. L. CORRAL, A. SILLITTI, and G. SUCCI. 2012. Mobile Multiplatform Development: An Experiment for Performance Analysis. Procedia Computer Science 10 (2012), 736--743. https://doi.org/10.1016/j.procs.2012.06.094Google ScholarGoogle ScholarCross RefCross Ref
  8. W.S. EL-KASSAS, B.A. ABDULLAH, A.H. YOUSEF, and A. WAHBA. 2014. ICPMD: Integrated cross-platform mobile development solution. In 2014 9th International Conference on Computer Engineering Systems (ICCES). 307--317. https://doi.org/10.1109/ICCES.2014.7030977Google ScholarGoogle ScholarCross RefCross Ref
  9. Facebook. 2012. Under the hood: Rebuilding Facebook for iOS. Retrieved on 2020-06-15, from https://www.facebook.com/notes/facebook-engineering/under-the-hood-rebuilding-facebook-for-ios/10151036091753920.Google ScholarGoogle Scholar
  10. Facebook. 2020. React Native. Retrieved on 2020-06-15, from https://facebook.github.io/react-native/.Google ScholarGoogle Scholar
  11. O. LE GOAER and S. WALTHAM. 2013. Yet Another DSL for Cross-platforms Mobile Development. In Proceedings of the First Workshop on the Globalization of Domain Specific Languages (GlobalDSL '13). ACM, New York, NY, USA, 28--33. https://doi.org/10.1145/2489812.2489819Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. Google. [n.d.]. J2ObjC: Overview. Retrieved on 2020-06-15, from https://developers.google.com/j2objc.Google ScholarGoogle Scholar
  13. Google. 2020. Flutter. Retrieved on 2020-06-15, from https://flutter.dev.Google ScholarGoogle Scholar
  14. I. GOUY. [n.d.]. The Computer Language Benchmarks Game. Retrieved on 2020-06-15, from https://benchmarksgame-team.pages.debian.net/benchmarksgame/sometimes-people-just-make-up-stuff.html.Google ScholarGoogle Scholar
  15. E. GUTHMANN. 2019. The (not so) hidden cost of sharing code between iOS and Android. Retrieved on 2020-06-15, from https://blogs.dropbox.com/tech/2019/08/the-not-so-hidden-cost-of-sharing-code-between-ios-and-android/.Google ScholarGoogle Scholar
  16. H. HEITKÖTTER, T.A. MAJCHRZAK, and H. KUCHEN. 2013. Cross-platform Model-driven Development of Mobile Applications with Md2. In Proceedings of the 28th Annual ACM Symposium on Applied Computing (SAC '13). ACM, New York, NY, USA, 526--533. https://doi.org/10.1145/2480362.2480464Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. H.HEITKÖTTER, S. HANSCHKE, and T.A. MAJCHRZAK. 2013. Evaluating Cross-Platform Development Approaches for Mobile Applications. In Web Information Systems and Technologies. Springer Berlin Heidelberg, Berlin, Heidelberg, 120--138.Google ScholarGoogle Scholar
  18. A. HOLZINGER, P. TREITLER, and W. SLANY. 2012. Making Apps Useable on Multiple Different Mobile Platforms: On Interoperability for Business Application Development on Smartphones. In Multidisciplinary Research and Practice for Information Systems. Springer Berlin Heidelberg, Berlin, Heidelberg, 176--189.Google ScholarGoogle Scholar
  19. R.D. HUIJSMAN, K.J. VAN KATWIJK, C. PRONK, and W.J. TOETENEL. 1987. Translating Algol 60 Programs into Ada. Ada Lett. VII, 5 (September 1987), 42--50. https://doi.org/10.1145/36077.36080Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. S.JIANG. 2016. Comparison of Native, Cross-Platform and Hyper Mobile Development Tools Approaches for iOS and Android Mobile Applications. Bachelor's thesis. Department of Computer Science and Engineering, University of Gothenburg.Google ScholarGoogle Scholar
  21. Kotlin. [n.d.]. Kotlin/Native. Retrieved on 2020-06-15, from https://kotlinlang. org/docs/reference/native-overview.html.Google ScholarGoogle Scholar
  22. D. MACOS and A. SOLYMOSI. 2013. ScaMo: Realisation of an OO-functional DSL for cross platform mobile applications development. AIP Conference Proceedings 1558, 1 (2013), 327--331. https://doi.org/10.1063/1.4825490 arXiv:https://aip.scitation.org/doi/pdf/10.1063/1.4825490Google ScholarGoogle ScholarCross RefCross Ref
  23. R. MADAUDO and P. SCANDURRA. 2013. Native versus Cross-platform frameworks for mobile application development. In VIII Workshop of the Italian Eclipse Community.Google ScholarGoogle Scholar
  24. Moshbit. 2020. Kotlift. Retrieved on 2020-06-15, from https://github.com/moshbit/Kotlift.Google ScholarGoogle Scholar
  25. A.G. OLLOQUI. 2020. SwiftKotlin. Retrieved on 2020-06-15, from https://github. com/angelolloqui/SwiftKotlin.Google ScholarGoogle Scholar
  26. Oracle. 2019. Java SE 12 & JDK 12 Documentation: CopyOnWriteArrayList. Available on https://docs.oracle.com/en/java/javase/12/docs/api/java.base/java/util/concurrent/CopyOnWriteArrayList.html, retrieved on 2020-06-15.Google ScholarGoogle Scholar
  27. M. PALMIERI, I. SINGH, and A. CICCHETTI. 2012. Comparison of cross-platform mobile development tools. In 2012 16th International Conference on Intelligence in Next Generation Networks. 179--186. https://doi.org/10.1109/ICIN.2012.6376023Google ScholarGoogle ScholarCross RefCross Ref
  28. G. PEAL. 2018. React Native at Airbnb. Retrieved on 2020-06-15, from https://medium.com/airbnb-engineering/react-native-at-airbnb-f95aa460be1c.Google ScholarGoogle Scholar
  29. J. PERCHAT, M. DESERTOT, and S. LECOMTE. 2013. Component based Framework to Create Mobile Cross-platform Applications. Procedia Computer Science 19 (2013), 1004--1011. https://doi.org/10.1016/j.procs.2013.06.140 The 4th International Conference on Ambient Systems, Networks and Technologies (ANT 2013), the 3rd International Conference on Sustainable Energy Information Technology (SEIT-2013).Google ScholarGoogle ScholarCross RefCross Ref
  30. J. PERCHAT, M. DESERTOT, and S. LECOMTE. 2014. Common framework: A hybrid approach to integrate cross-platform components in mobile application. Journal of Computer Science 10 (November 2014), 2165--2181.Google ScholarGoogle ScholarCross RefCross Ref
  31. Pinterest. 2020. ktlint: An anti-bikeshedding Kotlin linter with built-in formatter. Retrieved on 2020-06-15, from https://github.com/pinterest/ktlint.Google ScholarGoogle Scholar
  32. D.A. PLAISTED. 2013. Source-to-source translation and software engineering. Journal of Software Engineering and Applications 6, 04 (2013), 30.Google ScholarGoogle ScholarCross RefCross Ref
  33. A. PUDER and O. ANTEBI. 2013. Cross-Compiling Android Applications to iOS and Windows Phone 7. Mobile Networks and Applications 18, 1 (February 2013), 3--21. https://doi.org/10.1007/s11036-012-0374-2Google ScholarGoogle ScholarDigital LibraryDigital Library
  34. Readdle. 2018. Swift for Android: Our Experience and Tools. Retrieved on 2020-06-15, from https://blog.readdle.com/why-we-use-swift-for-android-db449feeacaf.Google ScholarGoogle Scholar
  35. S. SCHAUB and B.A. MALLOY. 2016. The Design and Evaluation of an Interoperable Translation System for Object-Oriented Software Reuse. Journal of Object Technology 15, 4 (2016).Google ScholarGoogle ScholarCross RefCross Ref
  36. V. VENDRAMINI. 2019. Research data on the Gryphon transpiler. https://doi.org/10.5281/zenodo.3489737 Retrieved on 2020-08-11, from https://github.com/vinivendra/GryphonResearch.Google ScholarGoogle ScholarCross RefCross Ref
  37. V. VENDRAMINI. 2020. Gryphon: The Swift to Kotlin translator. https://doi.org/10.5281/zenodo.3489740 Retrieved on 2020-08-11, from https://github.com/vinivendra/Gryphon.Google ScholarGoogle ScholarCross RefCross Ref
  38. P.J.L. WALLIS. 1985. Automatic Language Conversion and Its Place in the Transition to Ada. In Proceedings of the 1985 Annual ACM SIGAda International Conference on Ada (SIGAda '85). Cambridge University Press, New York, NY, USA, 275--284. https://doi.org/10.1145/324426.324399Google ScholarGoogle ScholarDigital LibraryDigital Library
  39. Q. YI. 2012. POET: A scripting language for applying parameterized source-to-source program transformations. Software: Practice and Experience 42 (June 2012). https://doi.org/10.1002/spe.1089Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Improving mobile app development using transpilers with maintainable outputs

      Recommendations

      Comments

      Login options

      Check if you have access through your login credentials or your institution to get full access on this article.

      Sign in
      • Published in

        cover image ACM Other conferences
        SBES '20: Proceedings of the XXXIV Brazilian Symposium on Software Engineering
        October 2020
        901 pages
        ISBN:9781450387538
        DOI:10.1145/3422392

        Copyright © 2020 ACM

        Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than the author(s) must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected].

        Publisher

        Association for Computing Machinery

        New York, NY, United States

        Publication History

        • Published: 21 December 2020

        Permissions

        Request permissions about this article.

        Request Permissions

        Check for updates

        Qualifiers

        • research-article
        • Research
        • Refereed limited

        Acceptance Rates

        Overall Acceptance Rate147of427submissions,34%

      PDF Format

      View or Download as a PDF file.

      PDF

      eReader

      View online with eReader.

      eReader