A COMPARISON OF CREATING AN ANDROID APPLICATION USER INTERFACE IN XAML AND IN C# CODE

Authors

  • Igor Košťál University of Economics in Bratislava, Faculty of Economic Informatics, Department of Applied Informatics, Bratislava
  • Martin Mišút University of Economics in Bratislava, Faculty of Economic Informatics, Department of Applied Informatics, Bratislava

DOI:

https://doi.org/10.12955/pns.v2.153

Keywords:

user interface, XAML, C# code, Android Xamarin.Forms application

Abstract

Almost every Android user application has some kind of user interface. Android programmers who create Xamarin.Forms applications and who uses the Microsoft Visual Studio development environment to do so can create user interfaces in the XAML (the Extensible Application Markup Language) or in the C# programming language. This paper deals with a comparison of creating this user interface by the first and the second way. We demonstrate the differences in the creation of Android application user interfaces in XAML and in C# by way of using two of our Android applications which were created by the Microsoft Visual Studio 2019 Enterprise, which work as text editors with the ability to store text to disc, and have user interfaces that are visually identical. However, the user interface of the first Android application was created in XAML with a C# support code, whereas the user interface of the second Android application was created entirely in C#. While comparing the source codes of the user interfaces of both these Android applications, we identify the advantages and disadvantages of both approaches to creating a user interface and we try to find out which of these approaches is better for maintaining and modifying user interfaces. In this study, we also contrast the processes of handling events of controls of a user interface created in the XAML code for the first Android application as well as that of the same user interface created in the C# code for the second Android application. Furthermore, we were interested in determining whether the different ways of creating user interfaces affected the execution time of basic operations that included disc files that were performed on the same data by both the applications. We assume that it does not fundamentally affect the execution time, and so, we performed an experiment to confirm or refute our assumption.

References

Albahari, J., & Albahari, B. (2017). C# 7.0 in a Nutshell. O'Reilly Media, Inc.

Butow, E., & Ryan, T. (2002). C# Your visual blueprint for building. NET applications. Hungry Minds, Inc.

Microsoft Corporation. (2021, March 8). Documentation. Retrieved from https://docs.microsoft.com

Petzold, Ch. (2016). Creating Mobile Apps with Xamarin.Forms. Xamarin Inc., Redmond: Microsoft Press.

Snider, E. (2018). Mastering Xamarin.Forms. Packt Publishing Limited.

Versluis, G., & Thewissen, S. (2018). Xamarin.Forms Solutions. APress.

Downloads

Published

2021-10-24

How to Cite

Košťál, I. ., & Mišút, M. . (2021). A COMPARISON OF CREATING AN ANDROID APPLICATION USER INTERFACE IN XAML AND IN C# CODE. Proceedings of CBU in Natural Sciences and ICT, 2, 52-62. https://doi.org/10.12955/pns.v2.153