0% found this document useful (0 votes)
10 views70 pages

Omsha Basil

The thesis compares .NET MAUI and Avalonia frameworks for cross-platform mobile application development, focusing on their differences and suitability for developers. An expense tracker app was developed using both frameworks to assess their implementation challenges, documentation quality, and feature integration. The findings indicate that .NET MAUI is more advantageous due to its superior user interface controls and better documentation compared to Avalonia.

Uploaded by

merkez
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views70 pages

Omsha Basil

The thesis compares .NET MAUI and Avalonia frameworks for cross-platform mobile application development, focusing on their differences and suitability for developers. An expense tracker app was developed using both frameworks to assess their implementation challenges, documentation quality, and feature integration. The findings indicate that .NET MAUI is more advantageous due to its superior user interface controls and better documentation compared to Avalonia.

Uploaded by

merkez
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 70

A Comparative Study of .

NET MAUI and


Avalonia in Cross-Platform Mobile
Application Development

Bachelor’s thesis
Degree Programme in Business Information Technology
Spring 2024
Basil Omsha
Degree Programme in Business Information Technology Abstract
Author Basil Omsha Year 2024
Subject A Comparative Study of .NET MAUI and Avalonia in Cross-Platform Mobile
Application Development
Supervisors Esa Huiskonen

The purpose of the thesis was to highlight the differences between .NET MAUI and Avalonia
to allow developers to determine which of the frameworks is better suited for cross-platform
mobile application development. An expense tracker app was created in the two frameworks.
The app implementation helped to highlight the main differences and issues faced as well as
assess the documentation quality and availability of the frameworks. The thesis also showed
different options available to implement the desired features. The topic was provided by the
HAMK research unit, also called HAMK Smart, and chosen by the author as the topic aligned
with his interest in learning more about cross-platform mobile development.

The theoretical part introduced software development in general, the different ways mobile
applications can be developed, general information about the frameworks, and available
third-party tools that can be utilized. The thesis is practice-based as it produced two
applications utilizing .NET MAUI and Avalonia to help understand the differences in
development and showcase the differences in the results, which served as a concrete
example for developers to decide which framework is more suited for cross-platform mobile
development.

In conclusion, cross-platform frameworks provide a good alternative to native development


as one codebase can produce applications for different devices. With both .NET MAUI and
Avalonia, it was possible to create mobile applications. However, MAUI was more suited as it
provided better user interface controls for mobile users than Avalonia, which has controls fit
for desktop applications at the time of writing this thesis. Also, MAUI provided a built-in
navigation schema, while Avalonia did not. Additionally, the documentation of MAUI was
easily accessible and available. Avalonia had one official website that contained the
necessary information, with little third-party content to support it.

Keywords .Net MAUI, Avalonia, Cross Platform Development, Mapsui, Realm


Pages 55 pages and appendices 6 pages
Glossary

OS Operating System
SDK Software Development kit
CPDT Cross-Platform Development Tool
WA Web Approach
HA Hybrid Approach
InA Interpreted Approach
CCA Cross-Compiled Approach
PWA Progressive Web Application
API Application Program Interface
JS JavaScript
App Application
OSM OpenStreetMap
NLS National Land Survey of Finland
DBMS Database Management System
MVVM Model-View-ViewModel
DI Dependency Injection
VS Visual Studio (IDE)
IDE Integrated Development Environment
XAML Declarative markup language used in .NET programming.
MVC Model View Controller
GPS Global Positioning System
CRUD Create Read Update Delete. Used in database operations.
Content

1 Introduction ............................................................................................................ 1
2 Mobile Application Development ............................................................................ 2
2.1 Native Mobile Application Development ........................................................ 4
2.2 Cross-platform Mobile Application Development ........................................... 4
2.2.1 .NET MAUI ........................................................................................ 5
2.2.2 Avalonia ............................................................................................ 6
2.2.3 React ................................................................................................. 7
2.2.4 React Native ...................................................................................... 8
2.3 MVVM Architectural Pattern .......................................................................... 9
2.3.1 Structure .......................................................................................... 10
2.3.2 Benefits and Downsides .................................................................. 11
3 Maps .................................................................................................................... 13
3.1 OpenStreetMap .......................................................................................... 13
3.2 Google Maps SDK ...................................................................................... 14
3.3 Bing Maps ................................................................................................... 14
3.4 National Land Survey of Finland ................................................................. 15
4 Mobile Persistent Storage .................................................................................... 16
4.1 MongoDB Atlas – cloud / local database ..................................................... 17
4.2 PostgreSQL – cloud / local database .......................................................... 18
4.3 SQLite – embedded database..................................................................... 19
4.4 Realm – local database............................................................................... 20
5 Agile development ............................................................................................... 22
5.1 Scrum ......................................................................................................... 22
5.2 Kanban ....................................................................................................... 23
6 Implementation Goals, Methods & Tools .............................................................. 24
7 Expense Tracker implementation ......................................................................... 26
7.1 Environment Setup ..................................................................................... 26
7.2 MVVM Set up.............................................................................................. 28
7.2.1 Model .............................................................................................. 29
7.2.2 Views............................................................................................... 30
7.2.3 View Models .................................................................................... 32
7.3 Persistent Storage ...................................................................................... 35
7.4 Maps ........................................................................................................... 37
7.5 Navigation ................................................................................................... 41
8 Results ................................................................................................................. 45
8.1 HAMK Smart ............................................................................................... 45
8.2 Expense Tracker App ................................................................................. 45
8.3 Documentation Quality ................................................................................ 47
8.4 Conclusion .................................................................................................. 47
9 Summary ............................................................................................................. 49
References ................................................................................................................. 50

Figures and program codes

Figure 1 Global market share held by mobile operating systems from 2009 to 2023, by
quarter (StatCounter, 2024) .......................................................................................... 3

Figure 2 Layers involved in compiling and running a .NET MAUI app (Lawrence, 2023,
Chapter Introduction to.NET MAUI) .............................................................................. 6

Figure 3 Most used web frameworks among developers worldwide, as of 2023 (Stack
Overflow, 2023) ............................................................................................................ 8

Figure 4 MVVM Core Components (Microsoft, 2022c) .................................................. 9

Figure 5 GridFS mechanism.(Carvalho et al., 2023, p. 7) ........................................... 17

Figure 6 Expense Tracker Kanban Board ................................................................... 24

Figure 7 MAUI Project Folders .................................................................................... 26

Figure 8 MAUI Platform Targeting Properties Window ................................................ 27

Figure 9 Creating Avalonia Project with a Template .................................................... 28

Figure 10 MVVM MAUI Structure ................................................................................ 29

Figure 11 Dependency Injection 1............................................................................... 32

Figure 12 Dependency Injection 2............................................................................... 33


Figure 13 Dependencies registration. ......................................................................... 33

Figure 14 Map Page View Model dependencies. ........................................................ 38

Figure 15 Map Methods .............................................................................................. 39

Program code 1 Main Project File “csproj” Configure Compilation (C#) ...................... 27

Program code 2 Expense Model Class ....................................................................... 30

Program code 3 ExpensePageView Imports and Component (XAML) ........................ 31

Program code 4 INotifyPropertyChanged Implementation .......................................... 34

Program code 5 MVVM Community Toolkit Implementation ....................................... 35

Program code 6 Avoid Duplicate validation. ................................................................ 35

Program code 7 Expense Model Realm Adaptation .................................................... 35

Program code 8 Open a Local Realm ......................................................................... 36

Program code 9 Add expense service operation method ............................................ 36

Program code 10 View Model Add Expense Method .................................................. 36

Program code 11 Realm CRUD methods. .................................................................. 37

Program code 12 Android permissions to access GPS features. ................................ 38

Program code 13 Widgets API .................................................................................... 39

Program code 14 Map Click Event Method ................................................................. 40

Program code 15 Creating a Pin Layer ....................................................................... 40

Program code 16 AppShell Navigation ....................................................................... 41


Program code 17 AppShell Navigation URI ................................................................ 42

Program code 18 ARoutes Registration. ..................................................................... 42

Program code 19 Confirm Function With URI-Based Navigation................................. 42

Program code 20 ApplyQueryAttributes Method ......................................................... 43

Program code 21 Main View Models Commands........................................................ 43

Appendices

Appendix 1. Material management plan


Appendix 2. Expense Tracker Application
1

1 Introduction

The competition between mobile platform providers like Android, iOS as well as other competitors
pushes the software industry to support their application across all available platform to increase
the customer base. While end user can experience identical features in different platforms,
implementing the features a cross different mobile devices require the usage of different
programming skills. When developers add new features, they must implement them separately to
support each platform, which can require a lot of resources. Thus, cross-platform solutions
emerged. (Chadha et al., 2017, p. 4)

The thesis topic was provided by the research unit of HAMK known as Hamk Smart. The subject
aims to help developers and companies understand differences between .NET MAUI and Avalonia
frameworks for cross-platform mobile development in terms of the implementation, produced app
and the documentation quality. The author had previously worked as an intern at Hamk Smart,
developing a desktop application with .NET MAUI. The internship served as an excellent
introduction to .NET MAUI and desktop development. After the internship, the writer was involved
in mobile development project with React Native. It was then a natural choice to further understand
.NET MAUI and how it compares to Avalonia, also how the frameworks compare to React Native
when it comes to cross-platform mobile development.

The thesis conducts an analysis of technical aspects, and development experience. The practical
part of the thesis involves the development of an expense tracker application using both .NET
MAUI and Avalonia. The application includes functionalities for incorporating a map layer and
utilizing local storage techniques. In addition, the thesis will explore different persistent storage
options. The practical part helps analysing the technical aspects to provide insights into how the
features are implemented in the frameworks and highlight the differences if any. The development
experience in the context of this thesis aims to focus on the quality and availability of each
framework documentation as well as the documentation of the third-party tools used to implement
the desired features.

The thesis aims to answer the following questions:

• What are the available options to implement the desired features in the selected
frameworks?
• What are the main differences in the frameworks’ implementation and in the applications
produced?
• What is the overall experience of each framework in terms of documentation, and possibility
to integrate third-party tools into the application?
2

2 Mobile Application Development

Software development in nutshell is the process of creating, designing, and deploying a software,
while a software is the program the tells a smart device like computers and cell phones what to do.
The process of developing a software involves many steps which are among other things: selecting
the work methodology for example agile development, gathering data and user requirements,
constructing the code in a suitable programming language, testing, and deploying the software for
use. (IBM, n.d.)

Going back to the late 2000’s, specifically September 2009, Apple had reached a milestone by
announcing that more than two billion applications had been downloaded from its App Store that
included then over 100,000 applications. Similarly, Android platform reported over 20,000 apps in
the Android Market online store by the end of 2009. These events played a significant role that led
consumers to spend more on applications, and independent developers to shift more towards
mobile application development. (Allen et al., 2010, Chapter The Smartphone is the New PC,
Application Marketplace’s first paragraph)

Fast forward to the fourth quarter of 2023 and as shown in Figure 1, Android maintained the
“leading mobile operating system” position globally with a market share of 70.1 percent over the
past 10 years followed by iOS which had a market share of 29.2 percent. Other operating systems
had a significantly smaller share compared to Android and iOS giants. (StatCounter, 2024)
3
Figure 1 Global market share held by mobile operating systems from 2009 to 2023, by quarter
(StatCounter, 2024)

While other operating systems that some mobile devices run on like Windows Mobile and
BlackBerry OS are seen in Figure1 the market is dominated by iOS and Android. (Pecujlija &
Petrovic, 2020, p. 853)

The competitive nature of the software industry arises companies’ interest in having their software
running on as many operating system as possible as well as running on different devices that
might or might not run on similar OS such as smart watches, tablets in addition to smartphones
and PCs. This diversity in OSs and devices challenge developers to handle specific characteristics
of each device that are among other things OS version, data storage, screen size, and sensors like
cameras and GPS. Such fragmentation forces companies and developers alike to choose to
develop their software on some OSs and devices because the lack of resources and knowledge to
develop their software natively for each OS and device available. To address the issues mentioned
cross-platform developing tools started to appear in the market. (Blanco & Lucrédio, 2021, p. 1;
Dhillon & Mahmoud, 2015, pp. 1331–1332)
4

2.1 Native Mobile Application Development

When the term native application is used it usually refers to the programming language or
framework the application is written with for the particular mobile platform. For example, Android
applications are written with Java then the Android software development kit (SDK) compiles the
code into an Android package. Similarly, iOS apps are written using Objective-C. However, in 2017
Google announced Kotlin as the preferred programming language for developing Android native
apps, and in 2014 Apple’s Swift became the preferred language for iOS native apps. (Fan & Wong,
2016, p. 210; see also Lardinois, 2019; see also Neuburg, 2013, p. 3)

When opting for developing an application natively, the application is designed for a specific
Operating System, such as iOS or Android. These apps have direct access to the device’s
sensors, cameras, and GPS which allows full usage of the device's features. Despite the benefits
mentioned, developing natively might require more resources including hiring more developers with
different sets of skills to develop the application separately for each platform which increases the
development time and cost. (El-Kassas et al., 2017, p. 167; Meirelles et al., 2019, p. 588)

2.2 Cross-platform Mobile Application Development

Cross-platform development tools (CPDT) allow for applications to be developed and compiled
using one platform and the output can be delivered according to programming languages and
templates defined by the operating systems of different devices. Furthermore, cross-platform tools
make the delivery of applications faster and reduces costs. (Işitan & Koklu, 2020, p. 273)

Huber et al (2022, p. 2) classify CPDTs approaches into five categories: Web, Hybrid, Interpreted,
Cross-compiled and Progressive Web. While the focus of this thesis is not to make a detailed
comparison between these approaches, they are briefly characterized below.

Web Approach (WA) development utilizes standard web technologies such as HTML, JavaScript,
and CSS. These applications can be accessed through the device browser through the given URL.
Furthermore, the creation of HTML5 made it possible for web applications to access smartphone’s
sensors such as gyroscope and accelerometer. This approach is easy to learn by developers, and
easy to maintain because the updates are done on the server. However, this approach requires
internet connection to run the app, and provides less performance. (Ciman & Gaggi, 2017, p. 217;
El-Kassas et al., 2017, p. 167)

Hybrid Approach (HA) like WA, HA also utilizes web technologies. The difference is that HA
framework provides access to the hardware through a JavaScript API abstraction. Additionally, HA
5
utilizes a WebKit to render the UI of the application on a mobile device. This approach allows for
the application to be packaged and distributed to users as native applications through application
stores. HA share same disadvantage as WA, but when compared to WA they are more complex to
test, because of the differences between browsers in PCs and smartphones. One prominent player
was PhoneGap also called Apache Cordova. In 2020 Adobe announced shutting PhoneGap down.
However, Apache Cordova is still maintained. (Rieger & Majchrzak, 2019, pp. 190–191; Ciman &
Gaggi, 2017, p. 217; see also Apache Cordova, 2020)

Interpreted Approach (InA) also uses JavaScript and CSS, but it does not use HTML, nor does it
require a web-browser. This approach allows development in a nonnative language that is familiar
with developers. When installing an application developed with InA a dedicated interpreter is
included to execute the code. InA allows for identical user interface (UI) to the native, as well as
the code produced is highly reusable. Titanium SDK and React Native framework are considered
popular options of InA. (Ciman & Gaggi, 2017, p. 217; Huber et al., 2022, p. 2)

Cross-Compiled Approach (CCA) similar to InA, development can be done using one nonnative
language, but unlike it the app doesn’t contain an interpreter, instead the native code is generated
for different platforms after compilation, which makes the final product considered a native
application. But some test done shows the native built apps still performed better because the code
is written by developers and generated. Popular platforms used for this purpose are Flutter, and
.NET MAUI which is a version upgrade for Xamarin. (Ciman & Gaggi, 2017, pp. 217–218; see also
Huber et al., 2022, p. 2; see also Selva, 2022)

Progressive Web Apps (PWA) was introduced in 2015 to extend the native experience of WA
applications by offering offline availability, push notifications, background synchronization with a
possibility to be used on a desktop computer and added to phones’ home screen without any need
of installation. And like web development, developers can use frameworks like React to build PWA.
(Huber et al., 2022, p. 3; Rieger & Majchrzak, 2019, p. 190)

2.2.1 .NET MAUI

.NET MAUI short for .NET Multi-platform App UI, as stated before, is a cross-platform framework
used to build mobile as well as desktop applications with C# (c-sharp) and XAML. With NET MAUI
developers can target mobile and desktop applications with a single codebase. Additionally, .NET
MAUI is open-source and serves as the next generation of Xamarin Forms. (Lawrence, 2023,
Chapter Introduction to.NET MAUI, What is .NET MAUI? first paragraph; see also Microsoft,
2023b)
6
.NET 6 and greater have platform specific APIs such as .NET for Android, .NET for iOS, .NET for
macOS, and Windows UI (WinUI 3). .NET MAUI servers as a “mediator API” and bridges the code
written by developers with the platform-specific APIs to allow for the “single code base” experience
and access to the native features of each platform. All the platform specific API’s share access to
.NET Base Class Library (BCL) which abstracts away from the code what the underlying platform
implements when the application runs. In addition, The BCL depends on the .NET runtime to
execute the application on the desired platform. Mono runtime is used to execute the environment
for Android, iOS and macOS, while for Windows .NET CoreCLR is used. (Lawrence, 2023,
Chapter Introduction to.NET MAUI; Microsoft, 2023b)

Figure 2 simplify what was mentioned, when building an Android application, the code is compiled
against .NET MAUI, .NET for Android, and the BCL, then the code runs on Mono runtime to
provide the full BCL implementation on the Android platform. The same is true for iOS and macOS.
However, with windows the only difference is that it uses .NET CoreCLR for the run time to
implement the BCL on Windows platform. (Lawrence, 2023, Chapter Introduction to.NET MAUI)

Figure 2 Layers involved in compiling and running a .NET MAUI app (Lawrence, 2023, Chapter
Introduction to.NET MAUI)

While the BCL allows for the “cross-platform” feature, it is possible to build a separate UI for each
platform using the desired platform-specific framework. This, however, involves maintaining a
separate code-base for each platform. (Microsoft, 2023b)

2.2.2 Avalonia

Avalonia is an open-source .NET cross-platform framework, supporting application development


across Windows, macOS, Linux, Android, iOS, and WebAssembly. Avalonia’s rendering engine
7
aims to provide a unified user interface experience, encouraging code-sharing and a maintaining a
uniformed look across different platform. In addition, developers can choose either C# or F# for
application development in Avalonia. Furthermore, Avalonia emphasizes unrestricted access to
platform capabilities and prioritizes performance through its compositional renderer. (Avalonia,
n.d.-b)

Avalonia provides two UI creation approaches: utilizing code with Avalonia's API or opting for a
declarative method using Extensible Application Markup Language (XAML). The later option allows
for the separation of UI structure found in a XAML file and runtime behavior in a “code-behind” file.
(Avalonia, n.d.-b)

According to Price (2021, Chapter Introducing Practical Applications of C# and .NET,


Understanding Avalonia’s second paragraph) Avalonia is the successor to WPF. WPS and
Silverlight. He adds that, developers familiar with WPF can benefit from the skills and experience.

2.2.3 React

React was introduced by Facebook in 2013 and is a JavaScript library for building user interfaces
without requiring any specific project architectural patterns such as Model View Controller (MVC),
and this allows React projects to be gradually integrated into existing systems. In Addition, React
has JSX which is a syntax extension of JavaScript. JSX can be used to write UI elements.
Furthermore, React utilizes components with which developers can write logic and markup in the
same file. The components can be a button as well as a page. (Ferreira & Valante, 2023, p. 2; see
also React, n.d.)

This open-source library can be used to develop Single Page Applications (SPAs) and mobile
applications with React Native. Utilizing the component-based architecture, ensures the separation
of logic and functionality of each component, which makes maintainability easier. (Zlatinov &
Angelova, 2023, p. 2)

Manipulation of Document Object Model (DOM) can be slow, and to optimize the performance of
web pages, the DOM usage should be minimized as much as possible. React proposed solution is
the virtual DOM, which is a representation of the DOM in memory and all changes done are kept
there. When change request to the page content occurs, first they are applied to the virtual DOM
located in the memory, then a “diff()” algorithm starts comparing the virtual DOM and the browser
DOM and instead of re-rendering the whole DOM only changes are reflected to the browser.
(Ranisavljević et al., 2022, pp. 121–122)
8
According to a survey done by Stack Overflow in 2023, and as seen in Figure 3, React took
second place following NodeJS as the most used web framework with 40.6 percent of participants
using it. (Stack Overflow, 2023)

Figure 3 Most used web frameworks among developers worldwide, as of 2023 (Stack Overflow,
2023)

While React application are written in JS, it is possible to write with TypeScript. One disadvantage
of React is that most of the libraries are third party and not maintained by Facebook, which can
necessitate considerations for security and potential impacts on source code. (Zlatinov &
Angelova, 2023, pp. 2–3)

2.2.4 React Native

React Native is an open-source framework based on React and was developed and used internally
by Facebook (now Meta) in 2013, then it was lunched for public use in 2015. Like other CPDTs,
React Native can be used to develop apps that run on iOS and android. Many popular mobile
applications have been developed using React native, such as Skype, Microsoft Teams, Shopify
and many more. (Albesher et al., 2023, p. 2)

In React Native, the application's JavaScript code is bundled and shipped with the application
during compilation. At runtime, the JavaScript code communicates with the native code through
“the Bridge” to facilitate interaction with native components. The bridge has been the core
component in React Native architecture, it is written with C++/Java, and it is tasked to transform
9
the JavaScript into source native code and vice versa. Similar to React, React Native relies on
components, which are reusable pieces of code. These components shape different parts of the
user interface and can be combined to form more complex interfaces. Furthermore, the framework
has standard built-in components like Buttons, Text, View, and Input; but developers can also
create custom components for reuse across different parts of the same app or even across other
apps. (Albesher et al., 2023, p. 3; Ranisavljević et al., 2022, p. 123)

It is worth to note that Meta platforms had worked on a new architecture in 2018 and released it as
an open source in 2022. One of the main differences in the new architecture is the absence of the
bridge. By replacing it with JavaScript Interface, they solved problems related to asynchronous
jobs that caused issues with data transfer. (Ranisavljević et al., 2022, p. 124; see also React
Native, 2024)

2.3 MVVM Architectural Pattern

Model-View-ViewModel (MVVM) is an architectural pattern used in software development projects.


John Gossman, a Microsoft application architect, introduced it in 2005. MVVM aims to create a
clear distinction between the business model, the user interface (UI), and the business logic. The
pattern does so by dividing the application project into three core components: the Models, Views,
and the View Models. Shown in Figure 4 the View Model allows two-way access with the Model as
well as with the Views components with each having their own task. (Yuen, 2017, Chapter A Smart
Way of Working with WPF; Microsoft, 2022c)

Figure 4 MVVM Core Components (Microsoft, 2022c)

Data binding is a required aspect in the MVVM pattern as it provides an easy way of
communication between the View and View Model classes. Furthermore, without data binding it
would be difficult to implement the Separation of Concerns design principle which was introduced
in 1974 to help in software design complexity. Additionally, data binding is crucial because with it
the View Model exposes data, behavior as properties to the View class. It also allows the View and
View Model seamless synchronization without having to create code for that. The View class with
data binding communicates user behavior to the View Model class using Commands then with it
10
the Model class can be updated. (Yuen, 2017, Chapter 1 A Smarter Way of Working with WPF;
see also Jarzabek & Kumar, 2016, p. 732; Nijs, 2023, Chapter 1 What Is The MVVM Design
Pattern?)

It is also necessary to understand the different ways data can follow including one-way, one-way-
to-source, one-time, and two-way data. In One-way, the data flows from the View Model to the
View class enabling the View Model's properties to be displayed on the View, ensuring that
updates to the View Model automatically reflect on the View class. One-way-to-source, data flows
from the View to the View Model, allowing synchronization of user inputted values with the View
Model. One-time is similar to one-way but does not check for changes to the bound property, when
the initial value is shown on the UI, any changes to it will not be reflected on the view, which can
enhance performance. Two-way, on the other hand, facilitates bidirectional data flow, allowing
changes made in the View to be automatically reflected back to the View Model, and vice versa.
An example to the two-way data flow is when property on the View class can be modified by the
user, such as input fields. (Nijs, 2023, Chapter 1 What Is The MVVM Design Pattern?)

2.3.1 Structure

The Model classes in the MVVM architecture serves as a container encapsulating applications’
data relating to the business and validation logic in a non-visual class. The business data model
and the validation logic are elments in the model calss in addition to the Data Access Layer with
which data access and persistent is provided to the application. Additionally, data models in
application normally represent the columns in the database tables.(Microsoft, 2022c; Yuen, 2017,
Chapter 1 A Smarter Way of Working with WPF)

The View class role is to set the strcuture, layout and appearance of the user interface (UI) to
present the data to users. It establishes a connection with a View Model through its DataContext
property, allowing it to display the supplied data. The View also exposes the functionalities
provided by the View Model by linking its commands to the UI controls used by the users such as
buttons, labels, forms, etc. Typically, each View is associated with one View Model, although a
View can bind to multiple data sources or reuse View Models. For example, a class named
"SecurityView" would likely have an associated "SecurityViewModel" instance set as its
DataContext property value. (Nijs, 2023, Chapter 1 What Is The MVVM Design Pattern?; Yuen,
2017, Chapter 1 A Smarter Way of Working with WPF)

For those familiar with the Model-View-Controller (MVC) architectural pattern, the View Model
serves a similar purpose as the Controller and that is providing the View class associated with it
with the necessary functionality. These functionalities provided shoud allow data to be exposed to
11
the View class by retrieving the data from the Model class and expose them through public
properties. Also, they should reflect change through data binding that acts like a live channel
between the View And View Model classes. In addtion to that, the View Model is also resposible to
handle users’ interactions such as clicking a submit button or filling an input field by having the
logic to handle these scenarios. Furthermore, the View Model should update the Model class upon
user interaction in a way the Model class can process. (Yuen, 2017, Chapter 1 A Smarter Way of
Working with WPF; Nijs, 2023, Chapter 1 What Is The MVVM Design Pattern?)

2.3.2 Benefits and Downsides

As mentioned earlier the MVVM architectural pattern implements the Separation of Concerns
design principles by separating the business model, the UI and the business logic. By doing so the
business logic represented in the View Model class is a detached entity from the business model
represented in the Model class. This allows for the usability of the Model class (business model) in
other applications and the possibility to replace the actual data with a mock-up model for testing
purposes without connecting to the actual database containing the business model data. (Yuen,
2017, Chapter 1 A Smarter Way of Working with WPF)

In addition to the separation between the business model and logic layer, MVVM also separate the
UI represented in the View class from the View Model class (business logic). This separation
facilitates the sharing of responsibilities in the development team because the UI and logic layers
are independent component in the MVVM pattern. Furthermore, the Model class (business model)
which contain the relevant data can be used in other development technologies because it doesn’t
contain the logic with in it instead it is in the Model. The MVVM pattern is considered to be easy to
understand since each View generally has its associated View Model that provides the logic and
connects it the data need in the Model layer, which makes it easier to pinpoint the properties used
in the View class. (Yuen, 2017, Chapter 1 A Smarter Way of Working with WPF; see also
Microsoft, 2022c)

In some cases, the MVVM pattern increases the complexity of the application specially if used in a
very small project where the Separation of Concerns design principles are not required. Also, data
binding requires time to learn and master, and some errors relating to it may only appear during
runtime which makes debugging harder. Additionally, time should be invested to comprehend the
different ways Views and View Models connect and exchange data, MVVM uses an unfamiliar way
to handle events, and arranging all the component in an optimal way can consume time and
require a learning curve. Furthermore, when using third parties’ data binding libraries it can
increase the application size, also, if MVVM not implemented well, the application can end up
12
having View Models overloaded with functions not related to it. (Yuen, 2017, Chapter 1 A Smarter
Way of Working with WPF; García, 2023, Chapter 4 MVVM: Model–View–ViewModel)
13

3 Maps

Many applications request users’ location, and often a map is presented to end-users with their
location data. There are a good number of location service providers some are open-source,
commercial (closed-source), and some provide free (normally limited version) and paid one with
more features such as Google, Microsoft (Bing Maps), and OpenStreetMap (open-source) to name
a few. These services use an SDK provided by the service provider. Maps can be integrated to
web and mobile applications with these SDKs. For instance, Google and Microsoft provide platform
specific SDKs to implement dynamic maps in mobile, desktop, and web applications. (Google
Maps Platform, n.d.-a; Microsoft, 2022a)

Another way can be by fetching a map image service from national Land Survey of Finland which
provides different APIs to get maps. The APIs are a connection to the NLS’s server with which
applications can get the desired material. NLS APIs use different standard such as WMS, WMTS,
WFS, REST and OGC API Feature. (National Land Survey of Finland, n.d.-a)

3.1 OpenStreetMap

OSM was founded by Steve Coast in 2004. In its early stages it was focused on mapping the UK.
Later in 2006 OSM Foundation was established and made the data available for anyone to use
and share. (OpenStreetMap Wiki, n.d.)

OSM as an open-source project allow users to create and provide free spatial data. The data is
generated in a wiki-like form, with which users can create, edit, download and use OSM in their
own apps. Additionally, OSM uses “local knowledge”, meaning contributors utilize aerial imagery,
GPS devices to ensure of OSM accuracy. (Ciepluch et al., 2009, p. 17; OpenStreetMap, n.d.-b)

The use of OSM data is free and licensed under Open Data Commons Open Database Licence.
When using map data, it is necessary to acknowledge that the data used belongs to
OpenStreetMap. While there are multiple ways to attribute, the “historical” copyright attribution
forms are accepted and can be done as “© OpenStreetMap contributors” or “© OpenStreetMap”.
(OpenStreetMap, n.d.-a; see also OpenStreetMap Foundation, n.d.)
14

3.2 Google Maps SDK

Google Maps are one of the most if not “the most” popular navigation system that provides
directions for many different transportation methods whether it is driving, walking, or biking. It was
developed in 2004 by Lars and Jens Rasmussen with C++. (Lanning et al., 2014, p. 2)

As mentioned before Google Maps provid platform specific SDKs for web, Android, and iOS. With
both Android and iOS SDKs, it is possible to add maps and map gesture responses as well as
additional features such as user interaction that involves adding markers and polygons to Android
apps. (Google Maps Platform, n.d.-b, n.d.-c)

To use Google Maps SDKs an API key is needed. The key can be obtained when developers
create a developer account on Google Cloud. The prices are presented per 1000 requests and
prices vary depending on the products. However, 200 USD as a monthly credit is offered by
Google Maps Platform allowing developers to experiment with Google Maps and Routes. When
user exceed $200, costs will start to generate. It is good to note that Maps SDK for Android and
iOS have no limits and are free to use and the usage is not applied against the $200 credit.
(Google Maps Platform, n.d.-d, see also n.d.-e)

3.3 Bing Maps

Bing Maps service is developed by Microsoft, which provide a number of APIs to utilize mapping
capabilities in “location-aware” apps. The first beta was released in 2005 and has since allowed
users to search for routes, countries, and regions. (Sinani, 2013, p. 20)

Like Google, developers can implement mapping in their application by utilizing the appropriate
API provided by Bing. There are several APIs which can be used depending on the application
need. For mobile development the Bing Map SDK is the suitable option for implementing the map
in the named mobile OSs. This API provides full map control such as displaying icons, drawing
polylines and polygons, and overlaying texture sources. Additionally, the map is powered by full
vector 3D map engine. (Microsoft, 2022d, 2022b)

The use of maps requires registration with the Bing Maps Dev Center. Through the service, the
developer receives a “Bing Map Key”. With the Dev Center, developers can manage resource
related to the map development. (Microsoft, 2022b; Bing maps | Dev Center, n.d.)
15
Developers experimenting with Bing Maps API to implement in a small-scale application, or
education and non-profit usage, Bing provides the Maps API free of charge. Additionally, the free
key also offers AI-powered tools such as location intelligence. (Microsoft, 2020)

3.4 National Land Survey of Finland

The NLS describes their product as: one, a maintained topographic data, and two, a production of
maps, aerial photos and laser scanning data of the entirety of Finland. The dataset contains among
other things places’ names, roads, fields, and topographic features. Additionally, the topographic
datasets are considered open data, and are free of charge according the NLS’s “open data license”
which requires the mention of their name (the NLS full name), the name of the datasets, as well as
the time when the NLS delivered the dataset to the user. Furthermore, these open data can be
used directly in an app utilizing one of NLS’s APIs mentioned earlier in chapter 2.4. However, most
of those APIs require a contract and are subject for a maintenance charge. NLS do offer a free trial
for some services in addition to few open-source APIs. According to the NLS, using their APIs
provides up-to-date materials and doesn’t require download nor copy to the system. (National Land
Survey of Finland, n.d.-c, n.d.-b, see also n.d.-a)

A contract can be established for utilizing map image services, including WMS and WMTS. Under
this agreement, the NLS ensures the functionality and availability of the service and provides user
support. Access to the service requires a username and password, with charges applicable as per
the contract terms. Alternatively, map image services like WMTS and Vector-tiles can be accessed
free of charge through an open API connection, utilizing an API key. However, the open interface
service lacks official support, and the Land Surveying Institute does not guarantee its functionality
or availability. (Maanmittauslaitos, n.d.)
16

4 Mobile Persistent Storage

Most mobile applications rely on data storage to fulfil their functionality. This requires the utilization
of databases, which serve as a fundamental component across various types of applications.
While certain apps, such as gaming applications, may only require basic data storage for elements
like scores, others, particularly those with extensive datasets, require databases to effectively
manage and organize information. Thus, data storage plays an important role in ensuring the
seamless operation of mobile applications. (Smyth, 2020, p. 573)

There are three different varieties to storing data in mobile applications, and depending on the
intended use, the app can be an offline, online, or a synchronised one. Offline apps store data on
the device and do not require internet connection, however, offline apps are prone to storage
capacity constraints and outdated information. Online apps communicate with a backend server to
get and modify the user data and require an internet connection to function. On the other hand,
synchronized apps allow the storage of data on the mobile device which allows offline usage, but
also the stored data can be updated when an internet connection is present. (Nickerson &
Muorato-Dussault, 2016, pp. 36–37)

When deciding on the application type, consideration needs to be given to a few important factors.
First, the speed at which the required data can be accessed must be considered. For apps that
function offline or synchronize with a server, reliance is placed on the device's speed, while online
apps are dependent on internet speed. Second, thought must be given to whether the data is
always available. Offline and synchronized apps typically have it readily accessible, whereas online
apps require internet access. Third, attention should be paid to the amount of data the app can
handle. Offline and synchronized apps are limited by the device's storage capacity, whereas online
apps can utilize as much as the server permits. Lastly, consideration should be given to the
currency of the data. Offline and online apps usually provide the most recent information, while
synchronized apps may experience delays. These factors impact the functionality of the app for
users, underscoring the importance of their consideration during the app's design phase.
(Nickerson & Muorato-Dussault, 2016, p. 38)

After discussing the importance of data storage in mobile applications and the different types of
mobile apps based on data storage needs, it is crucial to consider the available options for
implementing data storage in such applications. Below are few options discussed.
17

4.1 MongoDB Atlas – cloud / local database

Carvalho et al. (2023, p. 1) states that NoSQL databases are also called non-relational or not only
SQL and were created as another option to relational databases. NoSQL provides high
performance, scalability, and schema flexibility among other things. MongoDB stands as one of the
most popular NoSQL databases.

MongoDB is a document-oriented database built with C++ in 2009 and is open-source. MongoDB
is a suitable datastore for web, mobile and IoT applications. Additionally, it utilizes JSON format
documents which are then stored in BSON. Furthermore, MongoDB provides users with multiple
platforms including. Atlas, Enterprise Advanced, and a Community Edition. One advantage of
MongoDB that when a BSON format document size is over 16MB, it used GridFS, which is a
distributed storage engine to store large binary documents. As seen in Figure 5. the GridFS divides
the large binary documents into smaller parts of 225KB, however, the size of last piece takes the
necessary space left. (Carvalho et al., 2023, pp. 6–7)

Figure 5 GridFS mechanism. (Carvalho et al., 2023, p. 7)

Additionally, Carvalho et al. (2023, pp. 6–7) claims that GridFS utilizes two collections. The first
one stores the document pieces, while the second holds the metadata. Another use of GridFS is to
get a part of the document without loading it as a whole into the memory. The advantages of
MongoDB are summarised by the authors as: “It provides indexing, ad hoc queries, CRUD
operations, and MapReduce. It is ACID-compliant (Atomicity, Consistency, Isolation, and
Durability). It provides native drivers for programming languages and frameworks. It supports
master–slave replication. It supports horizontal, vertical, and tiered scaling.” However, there are
18
few disadvantages to MongoDB such as the possibility of easily eliminating data mistakenly due to
its nonrelational nature. Also, indexing occupies a lot of RAMs, and triggers are only supported on
MongoDB Atlas, the authors claim.

MongoDB atlas is a Daas (database as a service) meaning that the maintenance work, hardware
allocation and equipping, configuration, and recovery is the responsibility of the provider in this
case MongoDB. Atlas also provides a GUI (Graphical User Interface), time data snapshots, and
automated backups. Additionally, with Atlas it is possible to deploy a database cluster on multiple
cloud platforms such as AWS (Amazon Web Services), and Azure. (Hammad et al., 2024, sec.
Understanding MongoDB Atlas as a database-as-a-service, 2024, sec. Multi-cloud cluster)

In addition to cluster deployment, it is possible to deploy a serverless instances when users want a
minimal database configuration, develop in a cloud environment, and want the database to scale
automatically. Also, it is possible to set a global cluster when location awareness is needed for
globally distributed applications. Developers can also create a local deployment on the local
machine with Atlas CLI. (MongoDB, n.d.-b)

4.2 PostgreSQL – cloud / local database

PostgreSQL founded in 1986 is an object relational database management system (ORDBMS), is


open-source, and is by default transactional. It is possible to find online extensions that make
PostgreSQL support specific data and properties such as TimescaleDB. These extensions allow
the possibility of storing huge amount of data that can be used for metrics in cloud infrastructures,
web analytics and IoT equipment. One known extension for scaling PostgreSQL is Citus, which
allow data distribution in a cluster making PostgreSQL a distributed DBMS. However, Citus is not
natively supported by PostgreSQL and requires some libraries to function. (Gkamas et al., 2022,
pp. 2–3)

PostgreSQL offers features designed to support developers in application development,


administrators in maintaining data integrity, and users in efficiently managing datasets of any size.
Additionally, PostgreSQL allows customization such as defining custom data types and functions
without the need for recompilation. PostgreSQL aims to adhere to SQL standards, and as of the
September 2023 release, PostgreSQL aligns with a significant portion of SQL:2023 Core
conformance, namely about 170 out of the 179 mandatory features. (PostgreSQL, n.d.)

According to the official documentation of PostgreSQL (n.d.) key features include robust data type
support including primitive such as Integer and String, structured like arrays and date/time, as well
as document types (JSON, XML). Data integrity mechanisms are supported with exclusion
19
constraints and explicit locks among other things. Advanced indexing including GiST and SP-Gist,
comprehensive transaction support, and reliable disaster recovery functionalities such as
replication and point-in-time recovery. Furthermore, PostgreSQL can be extended through stored
procedures, procedural languages (Python, Perl), foreign data wrappers that allows connection to
other SQL databases, and numerous extensions like PostGIS.

4.3 SQLite – embedded database

According to Gaffney et al. (2022, p. 3535) in August 2000 SQLite was released as a library of data
management functions and packaged as Tcl programming language extension to simplify
database management by embedding it directly into host applications, which eliminates the need
for connecting to a database server as in the traditional client-server systems. The authors claim
that over the years SQLite has become the most widely used database engine, found in various
devices like web browsers, computers, TVs, and mobile devices. Additionally, SQLite is open
source thus it can be used for free in commercially and also for private purposes. (Gaffney et al.,
2022, p. 3535; see also SQLite, 2023)

SQLite's popularity is attributed to several key factors as it strives to be 1- cross-platform: enabling


easy database transfer across different architectures and platforms. 2- compact and self-
contained: with its single C file implementation and requiring no external dependencies simplifying
deployment. 3- reliable: is ensured through extensive testing, making it suitable for critical
applications like flight software. 4- fast: SQLite handles thousands of transaction rates efficiently
and providing optimized query planning for complex analytical tasks. (Gaffney et al., 2022, pp.
3535–3536; see also SQLite, 2023)

SQLite library robustness and reliability are attained through a handful of testing that insure among
other things that SQLite database will not corrupt on a system or application crash event or a
power failure while the database is updating, insures handling I/O (Input/Output) errors that can
accrues when for example a disk drive is full or malfunctions, and as well as correct handling out-
of-memory errors. (SQLite, 2024)

SQLite uses dynamic type system, which is different from the static typing used in other SQL
database engines. Unlike static typing, where the datatype is determined by the container, SQLite
associates the datatype directly with the value. SQLite offers five storage classes: NULL,
INTEGER, REAL, TEXT, and BLOB. Each class accommodates different types of data, with TEXT
storing text strings in UTF-8, UTF-16BE, or UTF-16LE encoding, and INTEGER and REAL storing
numerical values in various byte sizes. Additionally, SQLite does not provide a BOOLEAN class
instead the values are treated and stored as integers 0 and 1, and handles dates and times using
20
TEXT, REAL, or INTEGER formats. Furthermore, SQLite supports type affinity, and is a
recommended type for data storage. Type affinity involves examining the declared type of each
column and applying specific rules to assign the appropriate affinity. These rules prioritize
keywords and strings found within the declared type, such as "INT," "CHAR," "TEXT," "BLOB,"
"REAL," or "FLOAT." Depending on which keywords are present, SQLite assigns one of five
affinities: INTEGER, TEXT, NONE (or BLOB), REAL, or NUMERIC. For instance, if the declared
type contains "INT," the column is assigned INTEGER affinity, while if it contains "CHAR," "CLOB,"
or "TEXT," it receives TEXT affinity. This method ensures that each column is associated with the
most suitable affinity for data storage, maintaining consistency and compatibility within the SQLite
database and also compatibility with other database engines. (SQLite, 2022)

4.4 Realm – local database

Realm was introduced in 2014 and later bought by MongoDB in 2019 and is an open-source
mobile database and it is an alternative option to SQLite. Written in high-speed C++, Realm Core
maps C++ objects to disk and offers SDKs for Swift, Objective-C, C#, JavaScript, and Java,
allowing cross-platform development. Realm stores data in object format and manages them in B+
tree, which reduces hardware resource usage and queries are processed efficiently. According to
DB-Engines rankings, Realm popularity has increased since 2016, and it's widely adopted by
companies like Naver, KakaoMap, Dropbox Paper, and Sony Imaging Edge Mobile for its speed
and usability. While currently used primarily for fixed data, its usage for dynamic data management
is expected to grow, especially in messenger apps. In September 2023 MongoDB renamed Realm
to MongoDB Atlas Device SDKs. (Kim et al., 2022, p. 1; see also MongoDB, 2023)

The MongoDB Atlas Device SDKs run on the user’s device, and it uses the native query language
to access objects. Additionally, the SDKs run offline and does not require a network connection,
instead the data reading and writing happens on the persistent layer of the device. However, the
SDKs offer a possibility to synchronize data with services such as a backend server over the
network. Furthermore, it is possible to utilize live objects to always reflect the latest data on the
user interface. Live objects are representative to the underlying stored data, meaning that they
don’t hold any data, but instead live object reference the most current data on disk and the values
are loaded when accessed from a collection. This can optimize performance as only the data
needed is shown. (MongoDB, n.d.-c)

MongoDB Atlas SDKs wrap the Realm Core database which is written entirely in C++ rather than
being built on top of other database engines such as SQLite. and provides APIs to handle files on
filesystems to execute read and write operations. Additionally, and as mentioned before Realm is
object-oriented as it organizes data as object, unlike relational database where data are organized
21
in columns and rows. On a higher level, a collection of data objects saved from a “realm”, is
equivalent to a row in a SQL table or a document in MongoDB. Furthermore, the native design of
Realm allows for faster query and does not require any ORMs (Object Relational Mapping).
(MongoDB, n.d.-c)

Realm has a query language called Realm Query Language (RQL), which is a string-based
language, and it is used to retrieve objects from a realm. Methods created in different SDKs
communicate a query to the Realm query engine to get the matching object from the realm. RQL is
based on NSPredicate and work with most of platform SDKs except for the Swift SDK as it directly
uses NSPredicate query API. (MongoDB, n.d.-d)

As mentioned earlier, with Realm (Atlas Device SDKs) it is possible to synchronize data with
services over a network. This is particularly useful when users of a mobile application want their
data to be stored on the cloud and accessed from other devices as well. With synchronization data
is first saved on the device and then the data is synchronized to MongoDB Atlas on the cloud.
Additionally, device sync feature handles conflicts without the need to write customized code for it.
It also encrypts the data while the uploading process is ongoing. (MongoDB, n.d.-a)
22

5 Agile development

Back in 2001, a group of software and project experts discussed what their successful projects had
in common, resulting in the creation of the Manifesto for Agile Software Development, also known
as the Agile Manifesto. This manifesto outlines a set of values that prioritize individuals and
interactions, working software, customer collaboration, and adaptability over predefined processes
and plans. Alongside the manifesto, the group established 12 principles that further support these
values. (Layton et al., 2020, p. 13)

Agile development practices, rooted in lean production methodologies, prioritize core values such
as valuing individuals and interactions over processes and tools. These principles aim to facilitate
the rapid delivery of high-quality software products while minimizing waste and adapting
continuous learning and improvement. Additionally, agile project management is a method of
delivering a project in small, incremental stages to take into consideration customer feedback and
adjust when needed. This approach allows for flexibility and adaptability and is particularly well-
suited for today’s fast-paced business environment. Unlike traditional linear project management,
agile prioritizes rapid response and constant iteration. Agile is closely linked to DevOps, which
emphasizes collaboration between development and operations teams. (Hofmann et al., 2018, p.
46; Radigan, n.d.-a)

5.1 Scrum

Scrum is an agile framework, which follows an iterative approach through time-boxed sprints to
deliver functional increments of the product. Before a sprint, the development team select high
priority features from the backlog to be implemented in the upcoming sprint. (Hofmann et al., 2018,
p. 46)

Scrum is built upon five values that help in decision making. First comes commitment: team
members in Scrum are committed and willing to set achievable goals and realize them with the
participation of the whole team. During a sprint event, the goals should be clear and set with
feasible deadlines. Then these goals can be broken into smaller tasks to help realize them and
meet the commitment. Focus: Scrum methodology is designed in hopes to make participants focus
on few things and get them properly done by providing clear roles and objectives. Openness: by
keeping transparency and availability of work to be inspected and improved. Respect is another
value appreciated in Scrum as teammates are selected for the unique skills and each provide
value and diversity to the team. Finally, courage to take risks and embrace new ideas and solve
complex problems. (Layton et al., 2022, Chapter The Basics of Scrum, The five Scrum Values’
paragraph)
23
Additionally, the Scrum team is made from three roles: 1- development team that can consists of 5-
9 members that can be programmers, writers, designers, etc. 2- a Product Owner responsible for
managing the product backlog and prioritizing features based on business value and user stories.
Furthermore, the product owner should understand the customer, the value the scrum team
delivers, and the possible needs of other stakeholders. The Scrum Master facilitates collaboration,
communication, and removal of obstacles throughout the development process by helping the
product owner in understanding the value to be communicated and work with the backlog. In
addition, the scrum master helps the development team to self-organize and focus to meet the
goals. (Hofmann et al., 2018, p. 46; West, n.d.)

5.2 Kanban

Kanban originating from the Toyota Production System and adapted for software engineering,
focuses on limiting work in progress and visualizing the development value stream to reduce cycle
times. Unlike Scrum, Kanban is even more lightweight, with no defined roles or ceremonies. Its
principles revolve around starting with existing processes and incrementally improving them. A
Kanban board visualizes the workflow, enabling collaboration across multiple teams and domains,
including hardware and software aspects, as well as maintenance tasks. Kanban encourages the
adoption of additional practices from methodologies like Extreme Programming and Scrum.
(Hofmann et al., 2018, pp. 46–47)

The term "Kanban" is Japanese, and it means “signboard”. Kanban uses boards, which are used to
organize individual tasks into columns, to focus on ongoing tasks while having an overview of the
project. A Kanban board typically consists of cards and columns. Cards are the representation of
tasks, while columns highlight the different stages of the project. Typically, columns are divided into
three sections: to-do, in-progress, and done. Cards representing tasks are spread among columns,
progressing from “to-do” to “done” as tasks advance. (Microsoft 365 Team, 2021)

Presenting work as cards on a board aims to provide all team members with a visual overview of
task progress. Kanban cards contain information about the task, its progress, and the responsible
team member. The card also can include general description, detailed task information and an
estimate of the time required for completion. The visual representation improves communication
and transparency, ensuring everyone is aware of task status and responsibilities. (Radigan, n.d.-b)
24

6 Implementation Goals, Methods & Tools

The project work aimed to compare the two frameworks .NET Maui and Avalonia in cross-platform
mobile applications development by building an expense tracker minimum viable product
application to help understand how the features were implanted and what were the similarities and
differences in the implementation process between the selected frameworks. The comparison was
done by first documenting the main aspect related to the features implementation with .NET MAUI
and then highlight the differences and similarities with Avalonia. This work can potentially help
developers decide which of the two platforms is the more suited one for mobile development.
Additionally, the documentation of the frameworks was assessed based on its availability and
depth as it helped in building and implementing the features. Furthermore, a comparation with
React Native was conducted to understand the maturity of the platforms, by investigating available
support community, in addition to the documentation these frameworks provide.

The theory part of this thesis helps guiding the reader into the multi aspects of development in the
implementation project in addition to explore different options available for implementing the tools
with which the first research question is answered “What are the available options to implement the
desired features in the selected frameworks?” It is essential to understand the terminology, the
theoretical basis, and technicalities of the subject to set clear goals and achieve the desired
outcome.

Since the emergence of the internet to the public three decades ago and the rise of mobile devices
and apps as well as artificial intelligence in the past two decades, the state of information available
to the public became enormous and changed the way people work, communicate and access data
(Đorđević et al., 2024, pp. 453–454). When researching, the challenge lies in finding reliable and
up-to-date information related to the desired subject in a timely manner. The theory part aims to
cover and explore the topic from different angles by referencing multiple sources including peer-
reviewed journals for each topic at a time. While eBooks and official websites are not the most
reliable sources, they were still used as references when no peer-reviewed papers were found.

Kanban was the selected project management method. With it, the backlog was created, and the
high priority tasks were selected for a weekly increment. The selected tasks progressed in the
Kanban board from the “To do” to “Doing” and finally to the “Done” column upon task completion.
That facilitated having an overview on the project status (Figure 6).

Figure 6 Expense Tracker Kanban Board


25

A Word document was used as a diary to record the important implementation observations that
helped the comparative analysis. The idea was to record the implementation code, challenges,
available documentation found for implementing the desired features. Furthermore, the diary
consisted of three parts. First part was for .NET MAUI, the second part was for .NET Avalonia, and
finally a section for the comparative notes between the two frameworks.

Zotero is an open-source reference management tool. It is used to collect, extract, and save
bibliographic references. Zotero creates the reference in multiple text editors including Word, and
LibreOffice. Additionally, it has support for more than 9000 citation styles (Rangaswamy & Babu,
2021, p. 3). The citation management program Zotero was utilized for referencing the sources in
the theoretical part. As mentioned before Zotero supports multiple citation styles including the
American Psychological Association (APA) 7th edition utilized with HAMK’s theses. The author’s
intention to use the tool was also to extend his skills in using a new software. The download was
easy form the official website https://www.zotero.org/download/. The package downloaded
includes Zotero addon for Word. The same website provides a link to install the Chrome connector
which make the process of saving references quite fast and easy.

GitHub was used as the version control system, with it, two repositories were created to host the
codebase for the application implemented in each framework. To ensure clarity and organization,
different branches are created within the repositories for each feature implemented. For example, a
"main" branch contains the whole codebase and documentation, while feature-specific branches
such as “maps”, “form” contain code for the named feature.
26

7 Expense Tracker implementation

In this chapter, the important phases of the implementation were recorded, and covered multiple
aspects. The focus was to highlight the implementation differences between .NET MAUI and
Avalonia. The topics covered are the implementation setup, MVVM, OSM, Relam, as well as the
app navigation.

7.1 Environment Setup

MAUI provides multi targeting capabilities to target multi platforms within the same project structure
as in Figure 7. It does so by having a “platforms” folder containing children’s folders, these
platforms are Android, iOS, MacCatalyst, Tizen, and Windows. By default, any code files outside
the “platforms” folder will compile in all the platforms. But when targeting specific platforms, it is
possible to add code in each of the children folder depending on the need, because they contain
platform specific code.

Figure 7 MAUI Project Folders

Additionally, in.NET MAUI project and as shown in Figure 8, it is possible to select the platform of
development from the application properties window. In this project Android is targeted so the iOS,
Windows platform and Tizen (by default is unchecked) are unchecked.
27
Figure 8 MAUI Platform Targeting Properties Window

Furthermore, it is also possible in the project “csproj” file to configure the Multi Targeting MAUI
provides to avoid compiling code in the children folders. In this project case Windows, iOS and
MacCatalyst aren’t targeted. The code seen in Program code 1 makes sure that the iOS platform
code is not compiled. Similar to iOS, Windows and Mac Catalyst can be configured.

Program code 1 Main Project File “csproj” Configure Compilation (C#)


<!— iOS -->
<ItemGroup Condition="$(TargetFramework.StartsWith('net8.0-ios')) != true">
<Compile Remove="**\*.iOS.cs" />
<None Include="**\*.iOS.cs"
Exclude="$(DefaultItemExcludes);$(DefaultExcludesInProjectFolder)" />
<Compile Remove="**\iOS\**\*.cs" />
<None Include="**\iOS\**\*.cs"
Exclude="$(DefaultItemExcludes);$(DefaultExcludesInProjectFolder)" />
</ItemGroup>

If Android studio isn’t downloaded on the user PC, Visual Studio will download the necessary
Android SDK and Android Emulator. The steps are found on Windows’ .NET MAUI official
documentation webpage.

When creating a project with Avalonia in Visual Studio, the user is prompted to choose what
platforms to target so unwanted platforms will not be included. For example, to build only for
Android and iOS it is possible to select them without other platforms. Additionally, users can
choose between Reactive UI and Community toolkit to implement the MVVM design pattern.
28
However, it is also possible to start a project from a template which comes with needed files to
associate “Views” with “View Models”. To create a project with a template, it is necessary to first
install them to the machine in a chosen directory, and then select one of the available templates as
seen in Figure 9.

Figure 9 Creating Avalonia Project with a Template

The expense tracker project uses the “Avalonia Cross Platform Application” template that comes
with View locator file to help implement MVVM pattern. Furthermore, Avalonia unlike MAUI,
creates a separate project for each platform that can contain native implementations in addition to
a shared project that contains shared code for cross platform implementation.

7.2 MVVM Set up

As seen in the environment setup the folder structure does not come with a pre-defined MVVM
pattern, therefor they are created manually. The “Models” folders include the data models,
“ViewModels” has the logic and “Views” is where the UI files live. The structure for this project was
further refined to include subfolders in the main MVVM folders, in addition to having “Services”,
“Helpers”, and “Components” folders. These folders help further strengthen the Separation of
Concerns by having separated folders for “helper” functions, services for connecting to the local
database and execute operations as well as having UI components like lists and buttons in their
own files. (Figure 10).
29
Figure 10 MVVM MAUI Structure

Additionally, “Styles folder is created to contain separate styling files for each of the pages. This
makes debugging and reading the code significantly easier.

With Avalonia, after creating the project form a template it comes with a pre-defined “Views” and
“ViewModels” folders that support the MVVM pattern. However, the “Models” folder needs to be
created manually. The project structure similar to MAUI was further refined with “Services”,
“Helpers”, and “Assets” folders.

7.2.1 Model

Model classes for both Avalonia and Maui are implemented in the same way and hold a
presentation of data used in the application. For the Expense Tracker app, the data defined for the
expense are the date represented in properties for (day, month, year), amount, category, account,
location, latitude, longitude, note and description (Program code 2). In addition, the Expense model
30
provides the schema for expenses, to facilitate the communication between the application's
functions and the database. This representation is crucial when executing "Create, Read, Update,
Delete" (CRUD) operations, which are essential for maintaining and managing the data effectively.
For example, when an expense amount is updated, the model ensures that changes are accurately
captured and reflected in the database.

Program code 2 Expense Model Class


public partial class Expense
{
public string Id { get; set; }

public string Day { get; set; }

public string Month { get; set; }

....the rest of the mentioned properties


}

The Id property, a string data type, is a unique identifier for each expense, to help distinguishing
between individual entries. The properties Day, Month, and Year, also as strings, detail the time of
the transaction, allowing for later reporting and filtering based on day, month, or year The Amount
field, as a double, captures the monetary value of each expense. Additionally, the Category
property categorizes each expense into types such as groceries, transport, health, etc. aiding in
possible organization and analysis of spending patterns. The Account field identifies which method
of payment is used (cash, card, transfer). The location of each expense is recorded in the Location,
Latitude, and Longitude fields, providing geographical data that can be utilized by the user for
location-based spending analysis. Furthermore, the Note property allows users to add personal
comments or reminders about an expense. Lastly, the Description field offers a more elaborate
explanation of each transaction, including specifics like the purpose of the expense or items
purchased.

7.2.2 Views

The views in .NET MAUI and Avalonia are defined in a XAML file and contain the visual elements
and content of the page. However, Avalonia uses its own extension for XAML file, which is AXAML,
due to issues with Visual Studio (Avalonia, n.d.-a). In the Expense Tracker app five pages are
defined which are the “ExpensePageView”, “AddExpensePageView”, “ExpenseDetailPageView”,
“MapModalView”, and “MapPageView”. Avalonia follows similar naming to MAUI except for the two
map views which in Avalonia are named “SelectLocationView” and “ShowLocationsView”. At the
time of writing this thesis, the main page in both projects is set to the “ExpensePageView” which
shows a list of all expenses added by the user. The ExpensePageView in Maui uses a separate list
component to make the code more maintainable. In addition, both the “ExpensePageView”, its
31
component, and other pages have their own dedicated styles files, and view models. All these
different files need to be imported to the XAML file used in addition to the model to allow data
binding. All mentioned files and components are imported in the same manner as seen in Program
Code 3.

Program code 3 ExpensePageView Imports and Component (XAML)


<ContentPage xmlns=http://schemas.microsoft.com/dotnet/2021/maui
...More imports
xmlns:components="clrnamespace:incomeExpensTrckMAUI.Components.ExpenseListC
omps">
...more code
<components:ExpenseListComponent Grid.Row="1" BindingContext="{Binding}"/>
...Closing tags
</ContentPage>

Furthermore, MAUI provides two different XAML files for content creation, one is a “Content Page”
as the name indicates, it is used to create pages, and “Content View” can be used to create
components like the list component mentioned before. In Avalonia however, pages and
components are made with a “UserControl” axaml file.

The “AddExpensePageView” holds a form to create a new expense. Within the form an image
button in the location field is defined and opens the “MapModalView” to allow users pick a location
for their expense on the map. Additionally, While the user is on the “ExpensePageView” and when
an item is clicked from the expense list the user is navigated to the “ExpenseDetailPage”. Like the
“AddExpensePageView”, the “ExpenseDetailPageView” allows the users to see more information
about the selected expense as well as the possibility to update or delete it if wished to. Finally, the
“MapPageView” and “ShowLocationsView” are map view pages that shows the location of all the
created expenses.

Each of the view files created comes with a code-behind file defined as: <the name of the
file.xaml.cs> for example, the “ExpensPageView.xaml” has a code behind named
“ExpensPageView.xaml.cs”. it is possible to use these files to add the logic of the page, however,
as mentioned earlier in the theory part doing so will make it hard to test and share responsibility as
the logic and UI aren’t detached.

In MAUI the list showing the expenses was equipped the “TapGestureRecognizer” to allow users
to refresh the content by pulling down on the screen. The action triggers a request to fetch data
from the DB and update the UI. In Avalonia the same thing was implemented with what they call
“RefreshContainer” this also allow for the screen to be pulled from top to bottom to fetch new data.
32
7.2.3 View Models

As MVVM is used in this project, all the logic concerning each of the UIs is placed in their own view
model file. For example, the logic responsible for using the model and request to fetch the data
from the database for the “ExpensePageView” is defined in the “ExpensePageViewModel”. Same
is true for the rest of the UIs.

To connect the view to its view model in MAUI, dependency injection (DI) is required. With DI a
class can, be called in another class only when its needed. DI in MAUI is achieved for example by
injecting (requesting) the view model class inside the constructor class of the view, this indicates
that the injected property is a class with capabilities. Then a binding context can be set to the
injected view model to allow all the bindings in the XAML file to connect to the properties and
commands in the view model as in Figure 11. (Microsoft, 2024a)

Figure 11 Dependency Injection 1

In Avalonia view models do not have to be injected in the views’ constructor, as the template
provides a “ViewLocator” file, with which the views are associated with their corresponding view
models.

In another case a service is injected to the view model for use in both MAUI and Avalonia. In the
Expense tracker app, the Services class which contain the logic to connect and execute database
operations, is injected into the view models that need it. In this case binding context is not
necessary as there is no XAML file, however, instead, a local copy of the injected class is initialized
to be used within the view model. (Figure 12).
33
Figure 12 Dependency Injection 2

Finally, to make the DI work, all the “involved parties” sort to speak need to be registered and
invoked early stage of the app’s life cycle. In .Net MAUI, a file called “MauiProgram” includes the
logic to build the program and provides the ability to register the views, view models and services
used. For example, the “ExpensePageViewModel” and the “ExpenseService” need to be registered
so the app is aware that there is a dependency between the two classes. Additionally, MAUI
provides extension method for registration when there are many dependencies to register as in
Figure 13.

Figure 13 Dependencies registration.

While registering dependencies, a “lifetime” needs to be picked for each one of them. In the
Expense app most of the views and view models are registered with “AddSingleton” which means
34
one instance of the object is created and used wherever needed and will last the lifetime of the
app. “AddTransient” creates a new instance whenever needed. (Microsoft, 2024a)

In Avalonia however, to register classes, a dependency injection extension needs to be installed.


The documentation suggests the use of a Microsoft one. With it, it is possible to create a service
collection class where all the views, view models and services can be registered and assigned a
“lifetime” as in the MAUI implementation. Furthermore, an instance of the service collection needs
to be created in the App.axaml.cs file and then a service provider needs to be created as it
contains the services from the service collection.

When creating a view model in MVVM the class needs to inherit “INotifyPropertyChanged”
interface which also implements in the same view model “PropertyChangedEventHandler”
interface that is used in the “OnPropertyChanged” method. These interfaces allow the properties
and functions to be observed by the application and check for any changes in them. In the base
view model of the application the title property needs to be observable, to do so, first a private field,
and a public property for the title are set. Then, in the public property, the private field is checked
against it to see if they match, if so nothing happens, however if they do not match, the
“OnPropertyChanged” method is fired, and the change is observed by the app. (Program code 4).

Program code 4 INotifyPropertyChanged Implementation


using System.ComponentModel;
using System.Runtime.CompilerServices;

namespace incomeExpensTrckMAUI.ViewModels;

public partial class BaseViewModel : INotifyPropertyChanged


{

private string _title;

public string Title


{
get => _title;
set
{
if (_title == value)
return;
_title = value;
OnPropertyChanged();
}
}

public event PropertyChangedEventHandler PropertyChanged;

private void OnPropertyChanged([CallerMemberName] string name = null)


{
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(name));
}
}
35
This way all the properties in the Expense Tracker project can be set. However, Microsoft provides
a MVVM Community Toolkit library that can abstract most of the INotifyPropertyChanged interface.
The library significantly decreases the amount of code written and makes it more readable
(Program code 5).

Program code 5 MVVM Community Toolkit Implementation


using CommunityToolkit.Mvvm.ComponentModel;

namespace incomeExpensTrckMAUI.ViewModels;

public partial class BaseViewModel : ObservableObject


{
[ObservableProperty]
private string _title;
}

It is worth noting that the “App.axaml.cs” in Avalonia needs to include the line as seen in Program
6 code to avoid duplicate data validation. Avalonia has its own data validation and when using
MVVM Community toolkit, the application will get duplicate validation from both Avalonia and
Community toolkit. With Program 6 code Avalonia’s data validation is removed.

Program code 6 Avoid Duplicate validation.


BindingPlugins.DataValidators.RemoveAt(0);}

7.3 Persistent Storage

The Expense Tracker is an offline app and stores data on the device. Atlas Device SDKs also
knows as Realm was chosen to implement the database. To use it in both projects, all needed was
to install the package through the “NuGet” package manager in Visual Studio. Some modification
to the expense model was made to interact with Realm. These modifications included the class
inheritance of IRealmObject, defining the primary key and map the properties to the corresponding
ones in Realm DB (Program code 7).

Program code 7 Expense Model Realm Adaptation


using MongoDB.Bson;
using Realms;
public partial class Expense : IRealmObject
{
[PrimaryKey]
[MapTo("_id")]
public string Id { get; set; } = ObjectId.GenerateNewId().ToString();

[MapTo("day")]
public string Day { get; set; }
....the rest of the mentioned properties
}
36
A service class named “ExpenseServices” was made in a similar way in both MAUI and Avalonia
to handle the communication to the DB and all the CRUD operations. The connection initiation was
achieved by creating a method called “Init” that contains the code to create an instance with the
database and can be reused when needed (Program code 8).

Program code 8 Open a Local Realm


private void Init()
{
if (realm != null) return;

realm = Realm.GetInstance(); // Opens a local realm instance


//Console.WriteLine($"Realm is located at:
{realm.Config.DatabasePath}");

The “Init” method is called upon, whenever a CRUD operation is made. Additionally, each CRUD
operation has its own method in the service class, and they are called when needed from the view
models that has the “ExpenseService” injected into it. Furthermore, the
“AddExpensePageViewModel” uses the “AddExpense” method in the service which adds
expenses as in Program code 9.

Program code 9 Add expense service operation method


public async void AddExpense(Expense expense)
{
try
{
Init(); // make sure the realm connection is open

if (expense == null)
throw new ArgumentNullException("Invalid record");

await realm.WriteAsync(() =>


{
realm.Add(expense);
});
StatusMessage = "Expense added successfully.";
}
catch (Exception ex)
{
StatusMessage = $"Failed to add expense. {ex}";
}
}

The “AddExpensePageViewModel” has also a method that utilizes the local copy of the service
class to call the corresponding “add” method. The method creates an expense object then sends it
to the service as in Program code 10.

Program code 10 View Model Add Expense Method


[RelayCommand]
async Task AddExpense()
37
{
...Validation code
var expense = new Expense
{
Day = Day,
Month = Month,
Year = Year,
Amount = double.Parse(Amount),
//...the rest
};

// service method call


expenseService.AddExpense(expense);
.... confirmation messages code here
}

Similarly, other view models call the expense CRUD operation, the difference is the method used.
Program code 11 shows the different ways to perform the CRUD with Realm. Additionally, The
Realm query operators replaces the “Where” with “First”, or “FirstorDefault” among other operators.
This operator locates the first expense matching the specified Id.

Program code 11 Realm CRUD methods.


// Read all expenses
var expenses = realm.All<Expense>().ToList();

// Delete an expense based on Id


var expenseToDelete = realm.All<Expense>().FirstOrDefault(d => d.Id == id);
realm.Remove(expenseToDelete);

// Get an expense based on Id


var expenseToShow = realm.All<Expense>().FirstOrDefault(d => d.Id == id);

// Update an expense
var expenseToShow = realm.All<Expense>().FirstOrDefault(d => d.Id == id);
realm.WriteAsync(() =>
{
expenseToUpdate.Day = editedExpense.Day;
expenseToUpdate.Month = editedExpense.Month;
//...the rest of the object

7.4 Maps

The expense tracker utilizes OpenStreetMap. As mentioned earlier in the theory, OSM consists of
geographical data, but does not provide an API to directly use it in the project. To use OSM, there
are multiple sources that provide an API to show the Map. Most of the providers require creating
an account to get their API key. Normally the providers have a threshold set for free usage, once it
is surpassed, charges occur. Mapsui is one of these providers and is open-source .NET
component that can be used with most .NET frameworks like Avalonia and .NET MAUI and
requires no API key to implement the OSM in applications. (Mapsui, n.d.)
38
Before implementing OSM with Mapsui in MAUI and Avalonia, some configuration to the Android
platform needed to be done to allow the app to access the GPS hardware features by adding the
Program code 12 to the ../Android/AndroidManifest.xml file. In Avalonia the “Manifest” file needed
to be created., (Microsoft, 2024b)

Program code 12 Android permissions to access GPS features.

[assembly:UsesPermission(Android.Manifest.Permission.AccessCoarseLocation)]
[assembly:UsesPermission(Android.Manifest.Permission.AccessFineLocation)]
[assembly:UsesFeature("android.hardware.location", Required = false)]
[assembly:UsesFeature("android.hardware.location.gps", Required = false)]
[assembly:UsesFeature("android.hardware.location.network", Required =
false)]

There are two map views in the MAUI Expense app, the “MapPageView” shows all the expense
locations, and the “MapModalView” allows user while creating an expense, to pick one location on
the map. Both the pages have an “IGeolocation” dependency to get the current location. However,
the “MapPageView” has also a dependency with the Expense service so it can get all the expense
locations, in which later are saved to an observable list (Figure 14).

Figure 14 Map Page View Model dependencies.

In Avalonia, the views to show maps are “SelectLocationView” and “ShowLocationsView” and as
the names suggest, with the first one, users can pick a location on the map, and the other shows
all locations of expenses previously created. Unlike MAUI, Avalonia does not provide a way to get
the current location of the device. However, it is possible to download “Microsoft Maui Essentials”
package that contains cross platform APIs to work with device sensors and features including
39
“IGeoloaction”. In addition, Mapsui for Avalonia only provides a “MapControl” which does not
support databinding. While in MAUI, in addition to “MapControl” there is a “MapView” which allow
the map and its content to be observable and bindable from the view. Due to the lack of the
“MapView” API in Avalonia, the MVVM pattern was broken and the logic to show the map and its
content for both the “SelectLocationView” and “ShowLocationsView” was done on their respective
“code behind”.

The MAUI view models for both map views have two main methods to show the map (Figure.14),
the first one gets the current location, and the second one draws the map. In the
“MapPageViewModel” there is also the get expense location function to first get the expenses
coords form the DB and save them to the observable list. Later the list is iterated through to draw
the pins on the map (Figure.15)

Figure 15 Map Methods

Additionally, the MAUI Mapsui API equip the map with widgets to zoom in and out and navigate to
the current position without additional code. In Avalonia a zoom in and out buttons can be added to
the map by calling the “widgets” API (Program code 13)

Program code 13 Widgets API


map.Widgets.Add(new ZoomInOutWidget { MarginX = 20, MarginY = 40, BackColor
= Color.White });
40
The difference in the “MapModalView”, is the requirement to capture users’ click (tap) on the map
to get the chosen location coordination and pass it to the add expense form. The “OnMapClicked”
method works in a way that when the user clicks one time on the map a pin is added, and on the
second click the same pin is removed. That ensures the user add one location per expense. The
“MapClickedEventArgs” which is an event handler provided by Mpasui MAUI captures the
longitude and latitude on the position clicked. Then the coords can be used to create a pin utilizing
“Pin” API provided by Mapsui. The pins then are added to a list to keep track of their amount. It
also takes in consideration the current location pin and does the calculation based on the numbers
of pins in the list to determine whether adding or removing a pin (Program code 14).

Program code 14 Map Click Event Method


public void OnMapClicked(object sender, MapClickedEventArgs e)
{
double Y = e.Point.Latitude;
double X = e.Point.Longitude;
lastClickedLongitude = X;
lastClickedLatitude = Y;

// Add a pin at the clicked location


AddPin(lastClickedLatitude, lastClickedLongitude, Colors.Purple);

if (PinStored.Count == 1) // currnet location pin


{
AddPin(lastClickedLatitude, lastClickedLongitude, Colors.Purple);
}
else if (PinStored.Count > 2)
{
// More than two pins stored, remove the last two pins
Debug.WriteLine("Count is " + PinStored.Count);

// Retrieve the last two pins


var lastPin = PinStored[^1];
var secondToLastPin = PinStored[^2];

// Remove pins from UI


MapView.Pins.Remove(lastPin);
MapView.Pins.Remove(secondToLastPin);

// Remove pins from internal list


PinStored.Remove(lastPin);
PinStored.Remove(secondToLastPin);
}
}

Mapsui Avalonia, does not provide APIs to implement “on map clicked” nor for creating pins.
Instead, as a work around the Mapsui Avalonia has an event handler called “MapInfoEventArgs”
with which and according to the documentation it is called whenever the map is clicked. A map
layer was needed to show the pins on the map (Program code 15).

Program code 15 Creating a Pin Layer


private void AddPin(MPoint clickedPosition, Color color)
{
41
Map map = MapView.Map;

Layer = new GenericCollectionLayer<List<IFeature>>


{
Style = SymbolStyles.CreatePinStyle(color)
//Style = pinStyle
};
map.Layers.Add(Layer);
// Add a point to the layer using the Info position
Layer?.Features.Add(new GeometryFeature
{
Geometry = new Point(clickedPosition.X, clickedPosition.Y)
});
// To notify the map that a redraw is needed.
Layer?.DataHasChanged();
}

During the implementation it was noticed that a pin is added on the previous position where the
map was clicked or tapped to move the map around, and to show the pin, the map needed to be
double tapped.

7.5 Navigation

Maui projects provide “MAUI Shell” which can be thought of as a single location to define apps’
visual hierarchy, which allows implementing navigation with flyouts and tabs, as well as allows
navigation to any page using URIs. (Microsoft, 2023a)

In the MAUI Expense Tracker app, the navigation consists of a main bottom tab navigation
containing the main pages which are the “ExpensePageView”, “MainPageView”, and
“MapsPageView”. The tab navigation is defined in MAUI’s AppShell.xaml file (Program code 16).

Program code 16 AppShell Navigation


<TabBar>
<Tab IsEnabled="True" Title="Maui Expense Page" Icon="receipt_long.png"
>
<ShellContent
Title="ExpensePage"
ContentTemplate="{DataTemplate expenseview:ExpensePageView}"
Route="ExpensePage"
/>
</Tab>
<Tab IsEnabled="False" Icon="home.png" Title="Maui Main Page">
<ShellContent
Title="MainPage"
ContentTemplate="{DataTemplate mainview:MainPageView}"
Route="ExpensePage"
/>
</Tab>
<Tab IsEnabled="True" Icon="map.png" Title="Maui Expense Location">
<ShellContent
Title="Expense Location"
ContentTemplate="{DataTemplate mapview:MapsPageView}"
42
/>
</Tab>
</TabBar>

Additionally, more pages can be added to the navigation stack utilizing the URI capabilities. For
example, in the “ExpensePageView” a link to the “AddExpensePageView” is added to the app
header utilizing the function shown in Program code 17. When navigated to the target page, by
default MAUI Shell adds a back arrow to navigate back to the previous page. In addition, the target
page presentation mode can be set to “modal” which allow some animation when navigated to.
However, a “go back” or “close” button need to be made by the developer.

Program code 17 AppShell Navigation URI


[RelayCommand]
async Task NavToAddExpense()
{

var route = nameof(AddExpensePageView);


await Shell.Current.GoToAsync(route);

Furthermore, in order for URIs to work, the pages that aren’t part of the main navigation need to be
registered in the “AppShell.xaml” “code-behind” using Program code 18.

Program code 18 ARoutes Registration.


Routing.RegisterRoute(nameof(AddExpensePageView),
typeof(AddExpensePageView));

To pass the coordination data to the “AddExpensePageViewModel” the longitude and latitude are
passed through the URI, contained in the confirm location button method used by the
“MapMpodalViewModel” (Program code 19).

Program code 19 Confirm Function With URI-Based Navigation


[RelayCommand]
async Task ConfirmLocation()
{
double latitude = lastClickedLatitude;
double longitude = lastClickedLongitude;
await
Shell.Current.GoToAsync($"..?Latitude={latitude}&Longitude={longitude}",
true);
}

The functions navigate back to the previous page which is the “AddEpensePageView” containing
the form and passes the query parameters “Latitude” and “Longitude” that hold the last clicked
coordinates so that the AddExpensePageViewModel” can access them and use them. In addition,
the “AddExpensePageViewModel” has an “ApplyQueryAttributes” method to process the query
43
parameters received from the URI-based shell navigation. The method checks if the dictionary of
query parameters contains keys for Latitude and Longitude, if these keys exist, it assigns their
corresponding values to the Latitude and Longitude properties of the
“AddExpensePageViewModel”. After the properties are set, the UI is updated to show the
coordination on the form (Program code 20).

Program code 20 ApplyQueryAttributes Method


public void ApplyQueryAttributes(IDictionary<string, object> query)
{

if (query.ContainsKey(nameof(Latitude)))
Latitude = query[nameof(Latitude)]?.ToString();

if (query.ContainsKey(nameof(Longitude)))
Longitude = query[nameof(Longitude)]?.ToString();
UpdateLocation(); // Update the location field
}

The “Latitude” and “Longitude” in the “AddExpensePageViewModel” are observed properties and
they can update the UI. Furthermore, for the URI-based navigation to work the view classes need
to be registered in the “AppShell” file’s code behind.

In Avalonia there is no predefined way that describes the application hierarchy. Instead, Avalonia
has a main window for desktop applications and main view for other devises such as smart
phones. The “navigation” can be implemented by changing the content of the main window or main
view. The header and the bottom navigation taps were implemented in main view so they can be
utilized in all other pages. In addition, the bottom navigation was made with buttons and styled in a
way that mimics MAUI’s bottom navigation bar.

The “MainViewModel” contains the logic that changes the content of the “MainView”. It is done by
setting the content to an observable property named “CurrentViewModel”. Then in the view model
there are multiple commands that set the view model to each of the other pages’ view models
(Program code 21).

Program code 21 Main View Models Commands


public partial class MainViewModel : ViewModelBase
{

[ObservableProperty]
ViewModelBase currentViewModel;

.... Other code

public MainViewModel()
{
mainViewModel = this;
ShowExpensePage(); // Setting the main page to the expense page
44
Debug.WriteLine("MainViewModel instantiated");
}

[RelayCommand]
public void ShowExpensePage()
{
CurrentViewModel = new ExpensePageViewModel(expenseService,
mainViewModel);
Title = "Exp. Page Avalonia";
IsVisible = true;
}

[RelayCommand]
public void NavToExpenseDetail(string id)
{
//Debug.WriteLine($"Executing NavToExpenseDetail with ID: {id}");
CurrentViewModel = new ExpenseDetailsViewModel(expenseService, id,
mainViewModel);
//Debug.WriteLine("CurrentViewModel set to
ExpenseDetailsPageViewModel " + CurrentViewModel);
Title = "Expense Details Avalonia";
IsVisible = false;
}
....Other View Models
}

To make the navigation work, the commands in the “MainViewModel” are called form other view
models, by injecting the “MainViewModel” in their constructor and creating a local copy to access
the commands. If any parameter is needed in other views models it is also sent through the
commands’ constructor so that it also can be included in the view model’s constructor.
45

8 Results

This chapter discusses the differences observed in the applications produced with the .NET MAUI
and Avalonia. In addition, it sheds some light on the documentation quality of these frameworks
and their availability. It also discusses ease of finding community support for the frameworks and
the third-party tools used during the implementation.

8.1 HAMK Smart

The client feedback on this thesis highlighted both the theoretical and practical strengths of the
work. In the theoretical section, the client appreciated the detailed explanation of application
development in general, with a specific focus on mobile development and the intended features,
such as maps and storage. Although the client thought the inclusion of agile development was
somewhat outside the primary scope, it was still relevant to the overall development process. The
client added that the examples and illustrations used were well-suited and complemented the text
effectively.

In the practical section, the client acknowledged the thorough comparison between the
implementations of .NET MAUI and Avalonia. The provided code samples were thought to be clear
in demonstrating their purpose. The results provided a solid reasoning for choosing one framework
over the other, while also highlighting the current state of their documentation availability. The
client also commended the proper code and project structure, particularly noting the adherence to
separation of concerns and well-chosen naming conventions that minimized the need for excessive
comments. Overall, the client found the results aligned with expectations regarding the comparison
between MAUI and Avalonia, accurately. The client also thought that the thesis pointed out the
potential for a better future for Avalonia.

8.2 Expense Tracker App

The main difference between MAUI and Avalonia app was observed in the way the applications
are built, which significantly make the development experience different. As mentioned in chapter
8.5, due to the lack of a pre-built navigation schema in Avalonia, a work around had to be made to
achieve navigation between the pages, by creating a bottom tab with buttons and dynamically
change the current view model of the main view. The issue with this implementation arises when
we try to “navigate back”, the target view always resets and users need to fill a from again if they
are navigated back to that, except if field parameters are passed to the target view’s view model.
This scenario is seen when a user picks a location from the map and then navigates back to the
46
“AddExpensePage” all the fields in the Avalonia implementation are reset except for the location
field as it was passed as a parameter from the “SeletLocationviewModel”. In Maui “Shell
Navigation” preserves the state of the page content. (Appendix 2/1).

Another observation was made regarding the XAML form controls in the frameworks responsible
for creating form fields and selectors. In Maui, the controls are more suited and are more
accessible for mobile application users, while in Avalonia the controls are more suited for desktop
applications (Appendix 2/2). There are some libraries, that can allow Avalonia to use Maui controls,
however the thesis focused strictly on using prebuilt Avalonia controls.

In the expense list view, the “pull down to refresh” in Avalonia refreshes the data but no animation
is shown, only an empty space appears on top of the list. For that reason, it was only implemented
for the expenses list. In other pages a refresh button was created. However, in Maui a progress
circle appears during the refresh operation, and in addition to the expense page, it was
implemented in the “AddExpensePageView” and the “ExpenseDetailsPageView” (Appendix 2/3).

As mentioned in chapter 8.4, Mapsui for Avalonia only provides one event handler to register
changes when a map is clicked. In the Avalonia application it behaves in a way that the event
registers the location when map is “long clicked” to look for a location of interest, and the pins then
are added when the map is double clicked or tapped. This causes the pins to appear where the
long click occurred and not where the double clicks action took place. In Maui app, the dedicated
“On Map Click” event works in an expected way and show the pins when the user taps the map
one time. (Appendix 2/4).

Additionally, in the locations view, the two frameworks show the stored location successfully, and
the views are equipped with a refresh button to refresh the view when a new expense is added.
The refresh works as expected in MAU, however, in Avalonia while the refresh button does get the
new data, pins are only shown on the map when a double click occurs (Appendix 2/5).

In the “ExpensePageView” in both frameworks the android current location is accessed with the
help if the “IGeolocation”. In Maui the implementation seems to work and get the current location
defined in the emulator, but it still showed another “current location” set at 0 longitude and 0
latitude, and the zooming implemented, executed on the latter. In Avalonia, even though “Maui
Essentials” was added to the project, the implementation didn’t get the current location, so it was
hardcoded instead (Appendix.2/6).
47

8.3 Documentation Quality

During the implementation of the Expense Tracker App with .NET MAUI the documentation was
easily found. Microsoft has a comprehensive documentation for MAUI that goes through all the
features it provides, how to implement them as well as solving some common issues known with
.NET MAUI. In addition to the Microsoft documentation, there are a good amount of online video
tutorials, books, e-books written about the framework covering different kind of implementation
aspect ranging from beginner to advanced.

With Avalonia the documentation is limited to the official website. The website contains a lot of
information and is a good source to learn about the framework. There were not many tutorials
found, and those found were focused on project initialization or building a simple desktop
application. Additionally, the official documentation showed a Telegram community support.
However, when a join request was sent to the group, it got rejected.

Difficulties in finding documentation in the time of the project implementation were particularly
related to Mapsui. The issue aroused from the lack of clear documentation to implement specific
features for the map. On the official website, it is only mentioned how to show the world map, in
addition to the list of the API features provided with no clear instruction. Implementing the Maps in
the Expense tracker project, required intensive research to find some examples online to better
understand how Mapsui works. However, the component has an active community on GitHub and
tend to answer questions quickly.

On the other hand, implanting the database with Atlas Device SDKs (Realm) was easy due to the
fact MongoDB official website, like Microsoft, provides detailed documentation regarding
implementing the Realm in different frameworks including .NET ones.

8.4 Conclusion

The theory part of the thesis served as a good basis to gain general idea about the technologies
used in the project as well as introducing some of the different options available to integrate map
layers and implement persistent storage, which helped answer the first thesis question. In addition,
the implementation as well as the apps produced, helped show the differences, difficulties, and
issues faced. Furthermore, during the implementation project, the documentation quality and
availability were assessed. All these factors helped answering the second and third thesis
questions.
48
Based on the work during the thesis process, the author suggests that the best option of the two to
develop mobile applications is MAUI, as it is equipped with a navigation schema, and well-suited
UI controls for mobile applications. In addition, .NET MAUI has good documentation and content
that helps in learning the framework. While it is possible to create mobile applications with Avalonia
and while it continues to improve, it is better used for developing desktop application as the
controls it provides fit better that category.
49

9 Summary

In this thesis the aim was to define the differences between .NET MAUI and Avalonia, by building
an expense tracker application. The application project helped in assessing implementation
difficulties, and differences, documentation availability and ease, as well as observing differences
in the resulting apps.

The research questions were answered comprehensively. In the theory part different options to
implement maps, and persistent storage were discussed, and their features and possible issues
were highlighted. The implementation part showcased the important phases of the development in
both frameworks by highlighting the differences and issues faced. Additionally, the implementation
allowed assessing the available frameworks’ documentation, as well for the third-party tools
utilized. On the other hand, the resulting apps showed the differences in the UI and the user
experience.

This thesis allowed the author to deepen his knowledge of.NET MAUI, learn a new .NET
framework, understand the difference between them and for which use case they are better suited.
Additionally, the author was able to follow best practices by learning and implementing the MVVM
architectural pattern and learned how to implement the “INotifyPropertyChanged” which is
fundamental in MVVM. In addition, the author also learned abount MVVM Community toolkit that
abstract most of the code for the “INotifyPropertyChanged”, which makes the code easier to read.
Furthermore, the thesis helped in learning more about opensource projects in general thanks to
Mapsui integration into the app. With Mapsui, the author gained new skills on how to implement
maps into applications and how to navigate in opensource “environment” to find what is needed
and where to seek help from when necessary.

Utilizing cross platform framework is gaining more popularity specially as these frameworks are
constantly improving. However, while going through and reading multiple online discussions,
developers tend to hesitate to use MAUI as Microsoft has been dropping support on the
frameworks they create as they did with Xamarin forms. Because of that the tone tend to be
negative towards the Microsoft framework. For Avalonia however, developers in many online
discussions tend to be more optimistic about the framework and its future in cross platform mobile
development.

In a nutshell, the thesis was able to provide some options to integrate third party tools into the
.NET frameworks, highlight possible difference and issues developers might face during the
implementation, and produced apps to show concrete differences in their UI and user experience.
50

References
Albesher, L., Aldossari, R., & Alfayez, R. (2023). An Observational Study on React Native (RN) Questions
on Stack Overflow (SO). IET Software, 2023, 1–13. https://doi.org/10.1049/2023/6613434
Allen, S., Graupera, V., & Lundrigan, L. (2010). Pro Smartphone Cross-Platform Development: IPhone,
Blackberry, Windows Mobile and Android Development and Distribution.
https://doi.org/10.1007/978-1-4302-2869-1
Apache Cordova. (2020, August 14). Goodbye PhoneGap—Apache Cordova.
https://cordova.apache.org/announcements/2020/08/14/goodbye-phonegap.html
Avalonia. (n.d.-a). Introduction to XAML | Avalonia Docs. Retrieved May 6, 2024, from
https://docs.avaloniaui.net/docs/0.10.x/guides/basics/introduction-to-xaml
Avalonia. (n.d.-b). Welcome | Avalonia Docs. Avalonia. Retrieved March 4, 2024, from
https://docs.avaloniaui.net/docs/welcome
Bing maps | Dev Center. (n.d.). Bing Maps Dev Center—Bing Maps Dev Center. Retrieved March 14, 2024,
from https://www.bingmapsportal.com/
Blanco, J. Z., & Lucrédio, D. (2021). A holistic approach for cross-platform software development. The
Journal of Systems and Software, 179, 1–16. https://doi.org/10.1016/j.jss.2021.110985
Carvalho, I., Sá, F., & Bernardino, J. (2023). Performance Evaluation of NoSQL Document Databases:
Couchbase, CouchDB, and MongoDB. Algorithms, 16(2), 78. https://doi.org/10.3390/a16020078
Chadha, S., Byalik, A., Tilevich, E., & Rozovskaya, A. (2017). Facilitating the development of cross-
platform software via automated code synthesis from web-based programming resources. Computer
Languages, Systems & Structures, 48, 3–19. https://doi.org/10.1016/j.cl.2016.08.005
Ciepluch, B., Mooney, P., Jacob, R., & Winstanley, A. C. (2009). Using OpenStreetMap to deliver location-
based environmental information in Ireland. SIGSPATIAL Special, 1(3), 17–22.
https://doi.org/10.1145/1645424.1645428
Ciman, M., & Gaggi, O. (2017). An empirical analysis of energy consumption of cross-platform frameworks
for mobile development. Pervasive and Mobile Computing, 39, 214–230.
https://doi.org/10.1016/j.pmcj.2016.10.004
Dhillon, S., & Mahmoud, Q. H. (2015). An evaluation framework for cross-platform mobile application
development tools. Software: Practice and Experience, 45(10), 1331–1357.
https://doi.org/10.1002/spe.2286
Đorđević, N., Đorđević, V., & Čabarkapa, O. (2024). Interaction between humans and computers: Key
aspects and evolution. Vojnotehnicki Glasnik, 72(1), 452–481. https://doi.org/10.5937/vojtehg72-
47701
El-Kassas, W. S., Abdullah, B. A., Yousef, A. H., & Wahba, A. M. (2017). Taxonomy of Cross-Platform
Mobile Applications Development Approaches. Ain Shams Engineering Journal, 8(2), 163–190.
https://doi.org/10.1016/j.asej.2015.08.004
51
Fan, X., & Wong, K. (2016). Migrating user interfaces in native mobile applications: Android to iOS.
Proceedings of the International Conference on Mobile Software Engineering and Systems, 210–
213. https://doi.org/10.1145/2897073.2897101
Ferreira, F., & Valante, M. T. (2023). Detecting code smells in React-based Web apps. Information and
Software Technology, 155, 107111-. https://doi.org/10.1016/j.infsof.2022.107111
Gaffney, K. P., Prammer, M., Brasfield, L., Hipp, D. R., Kennedy, D., & Patel, J. M. (2022). SQLite: Past,
present, and future. Proceedings of the VLDB Endowment, 15(12), 3535–3547.
https://doi.org/10.14778/3554821.3554842
García, R. F. (2023). MVVM: Model–View–ViewModel.
Gkamas, T., Karaiskos, V., & Kontogiannis, S. (2022). Performance Evaluation of Distributed Database
Strategies Using Docker as a Service for Industrial IoT Data: Application to Industry 4.0.
Information (Basel), 13(4), 190. https://doi.org/10.3390/info13040190
Google Maps Platform. (n.d.-a). Google Maps Platform Documentation. Google for Developers. Retrieved
March 12, 2024, from https://developers.google.com/maps/documentation
Google Maps Platform. (n.d.-b). Maps SDK for Android overview | Google for Developers. Retrieved March
13, 2024, from https://developers.google.com/maps/documentation/android-sdk/overview
Google Maps Platform. (n.d.-c). Overview | Maps SDK for iOS | Google for Developers. Retrieved March
13, 2024, from https://developers.google.com/maps/documentation/ios-sdk/overview
Google Maps Platform. (n.d.-d). Platform Pricing & API Costs. Google Maps Platform. Retrieved March 13,
2024, from https://mapsplatform.google.com/pricing/
Google Maps Platform. (n.d.-e). Set up your Google Cloud project | Maps SDK for Android | Google for
Developers. Retrieved March 13, 2024, from
https://developers.google.com/maps/documentation/android-sdk/cloud-setup
Hammad, M. A., Aleksendrić, M., Borucki, A., Domingues, L., Hannouch, E., Nair, R., & Palmer, R. (2024).
Mastering MongoDB 7.0—Fourth Edition.
Hofmann, C., Lauber, S., Haefner, B., & Lanza, G. (2018). Development of an agile development method
based on Kanban for distributed part-time teams and an introduction framework. Procedia
Manufacturing, 23, 45–50. https://doi.org/10.1016/j.promfg.2018.03.159
Huber, S., Demetz, L., & Felderer, M. (2022). A comparative study on the energy consumption of
Progressive Web Apps. Information Systems, 108, 102017. https://doi.org/10.1016/j.is.2022.102017
IBM. (n.d.). What is software development? Retrieved February 26, 2024, from
https://www.ibm.com/topics/software-development
Işitan, M., & Koklu, M. (2020). Comparison and Evaluation of Cross Platform Mobile Application
Development Tools. International Journal of Applied Mathematics Electronics and Computers, 8(4),
273–281. https://doi.org/10.18100/ijamec.832673
Jarzabek, S., & Kumar, K. (2016). On interplay between separation of concerns and genericity principles:
Beyond code weaving. Computer Science and Information Systems, 13(3), 731–758.
https://doi.org/10.2298/CSIS160129028J
52
Kim, S., Kim, G., Shin, S., Youn, B., Song, J., Lee, I., & Kim, J. (2022). Methods for recovering deleted data
from the Realm database: Case study on Minitalk and Xabber. Forensic Science International:
Digital Investigation, 40, 1–11. https://doi.org/10.1016/j.fsidi.2022.301353
Lanning, D. R., Harrell, G. K., & Wang, J. (2014). Dijkstra’s algorithm and Google maps. Proceedings of the
2014 ACM Southeast Regional Conference, 1–3. https://doi.org/10.1145/2638404.2638494
Lardinois, F. (2019, May 7). Kotlin is now Google’s preferred language for Android app development.
TechCrunch. https://techcrunch.com/2019/05/07/kotlin-is-now-googles-preferred-language-for-
android-app-development/
Lawrence, S. (2023). Introducing . NET MAUI: Build and Deploy Cross-Platform Applications Using C#
and . NET Multi-platform App UI.
Layton, M. C., Kynaston, D. J., & Ostermiller, S. J. (2022). Scrum for Dummies. John Wiley & Sons,
Incorporated.
Layton, M. C., Ostermiller, S. J., & Kynaston, D. J. (2020). Agile Project Management for Dummies. John
Wiley & Sons, Incorporated. http://ebookcentral.proquest.com/lib/hamk-
ebooks/detail.action?docID=6336502
Maanmittauslaitos. (n.d.). Karttakuvapalvelu (WMS, WMTS, Vektoritiilet) | Maanmittauslaitos. Retrieved
March 18, 2024, from https://www.maanmittauslaitos.fi/karttakuvapalvelu
Mapsui. (n.d.). Introduction. Mapsui Documentation. Retrieved April 19, 2024, from
https://mapsui.com/documentation/home.html
Meirelles, P., Rocha, C., Assis, F., Siqueira, R., & Goldman, A. (2019). A Students’ Perspective of Native
and Cross-Platform Approaches for Mobile Application Development. 586–601.
https://doi.org/10.1007/978-3-030-24308-1_47
Microsoft. (2020, February 12). Maps API Key | Create a Map App | Bing Maps for Enterprise.
https://www.microsoft.com/en-us/maps/bing-maps/create-a-bing-maps-key
Microsoft. (2022a, February 20). Bing Maps API | Free Trial, Explore Features, Talk to Specialists.
https://www.microsoft.com/en-us/maps/bing-maps/choose-your-bing-maps-api
Microsoft. (2022b, July 25). Bing Maps SDK for Android and iOS - Bing Maps. Microsoft Learn.
https://learn.microsoft.com/en-us/bingmaps/sdk-native/
Microsoft. (2022c, November 4). Model-View-ViewModel—.NET. Microsoft Learn.
https://learn.microsoft.com/en-us/dotnet/architecture/maui/mvvm
Microsoft. (2022d, December 15). Getting Started with Bing Maps—Bing Maps. Microsoft Learn.
https://learn.microsoft.com/en-us/bingmaps/getting-started/
Microsoft. (2023a, January 4). .NET MAUI Shell overview—.NET MAUI. https://learn.microsoft.com/en-
us/dotnet/maui/fundamentals/shell/?view=net-maui-8.0
Microsoft. (2023b, July 25). What is .NET MAUI? - .NET MAUI. Microsoft Learn.
https://learn.microsoft.com/en-us/dotnet/maui/what-is-maui?view=net-maui-8.0
53
Microsoft. (2024a, January 19). Dependency injection in .NET MAUI - .NET MAUI.
https://learn.microsoft.com/en-us/dotnet/maui/fundamentals/dependency-injection?view=net-maui-
8.0
Microsoft. (2024b, February 9). Geolocation—.NET MAUI. Microsoft Learn. https://learn.microsoft.com/en-
us/dotnet/maui/platform-integration/device/geolocation?view=net-maui-8.0
Microsoft 365 Team. (2021, April 8). How to use a Kanban solution to manage your team tasks.
https://www.microsoft.com/en-ww/microsoft-365/business-insights-ideas/resources/how-to-use-a-
kanban-solution-to-manage-your-team-tasks
MongoDB. (n.d.-a). Atlas Device Sync—Atlas App Services. MongoDB. Retrieved April 6, 2024, from
https://www.mongodb.com/docs/atlas/app-services//sync/
MongoDB. (n.d.-b). Create a Database Deployment—MongoDB Atlas. Retrieved March 24, 2024, from
https://www.mongodb.com/docs/atlas/create-database-deployment/
MongoDB. (n.d.-c). Introduction to Atlas Device SDK — Atlas Device SDK. Retrieved March 22, 2024, from
https://www.mongodb.com/docs/realm/introduction/
MongoDB. (n.d.-d). Realm Query Language—Atlas Device SDK. Retrieved March 22, 2024, from
https://www.mongodb.com/docs/realm/realm-query-language/
MongoDB. (2023, September). Realm is Now Atlas Device SDKs | MongoDB Blog. MongoDB.
https://www.mongodb.com/blog/post/realm-now-part-atlas-platform
National Land Survey of Finland. (n.d.-a). General information about interface services | National Land
Survey of Finland. Retrieved March 12, 2024, from https://www.maanmittauslaitos.fi/en/maps-and-
spatial-data/datasets-and-interfaces/general-information-about-interface-services
National Land Survey of Finland. (n.d.-b). National Land Survey open data Attribution CC 4.0 licence |
National Land Survey of Finland. Retrieved March 18, 2024, from
https://www.maanmittauslaitos.fi/en/opendata-licence-cc40
National Land Survey of Finland. (n.d.-c). Topographic data and how to acquire it | National Land Survey of
Finland. Retrieved March 18, 2024, from https://www.maanmittauslaitos.fi/en/maps-and-spatial-
data/professionals/topographic-data-and-how-acquire-it
Neuburg, M. (2013). IOS 7 Programming Fundamentals: Objective-C, Xcode, and Cocoa Basics. O’Reilly
Media, Inc.
Nickerson, R. C., & Muorato-Dussault, F. B. (2016). Selecting a Stored Data Approach for Mobile Apps.
Journal of Theoretical and Applied Electronic Commerce Research, 11(3), 35–49.
https://doi.org/10.4067/S0718-18762016000300004
Nijs, P. (2023). The MVVM Pattern in .NET MAUI.
OpenStreetMap. (n.d.-a). Copyright and License. OpenStreetMap. Retrieved March 10, 2024, from
https://www.openstreetmap.org/copyright/en
OpenStreetMap. (n.d.-b). OpenStreetMap. OpenStreetMap. Retrieved March 10, 2024, from
https://www.openstreetmap.org/about
54
OpenStreetMap Foundation. (n.d.). Licence/Attribution Guidelines—OpenStreetMap Foundation. Retrieved
March 10, 2024, from
https://osmfoundation.org/wiki/Licence/Attribution_Guidelines#Attribution_text
OpenStreetMap Wiki. (n.d.). History of OpenStreetMap—OpenStreetMap Wiki. Retrieved March 10, 2024,
from https://wiki.openstreetmap.org/wiki/History_of_OpenStreetMap
Pecujlija, M., & Petrovic, D. (2020). Smartphone OS and User Emotion and Ethics. Tehnicki Vjesnik -
Technical Gazette, 27(3), 853–859. https://doi.org/10.17559/TV-20190611134114
PostgreSQL. (n.d.). PostgreSQL: About. Retrieved March 25, 2024, from https://www.postgresql.org/about/
Price, M. J. (2021). C# 10 and .NET 6—Modern Cross-Platform Development—Sixth Edition. Packt
Publishing.
Radigan, D. (n.d.-a). Agile vs. Waterfall project management. Atlassian. Retrieved March 21, 2024, from
https://www.atlassian.com/agile/project-management/project-management-intro
Radigan, D. (n.d.-b). Kanban—A brief introduction. Atlassian. Retrieved March 21, 2024, from
https://www.atlassian.com/agile/kanban
Rangaswamy, B., & Babu, H. R. (2021). Researcher’s Perception on Zotero and Mendeley Reference
Management Tools: A Study. Library Philosophy and Practice, 0_1-11.
Ranisavljević, T., Karabašević, D., Brzaković, M., Popović, G., & Stanujkić, D. (2022). REACT NATIVE:
A BRIEF INTRODUCTION TO MODERN CROSS-PLATFORM MOBILE APPLICATION
DEVELOPMENT. Quaestus (Timio̦ara), 21, 120–136.
React. (n.d.). Quick Start – React. Retrieved March 5, 2024, from https://react.dev/learn
React Native. (2024, March 5). About the New Architecture · React Native. https://reactnative.dev/docs/the-
new-architecture/landing-page
Rieger, C., & Majchrzak, T. (2019). Towards the definitive evaluation framework for cross-platform app
development approaches. The Journal of Systems and Software, 153, 175–199.
https://doi.org/10.1016/j.jss.2019.04.001
Selva, G. K. (2022, May 31). Xamarin Versus .NET MAUI | Syncfusion Blogs. Xamarin Versus .NET
MAUI. https://www.syncfusion.com/blogs/post/xamarin-versus-net-maui.aspx
Sinani, A. (2013). Learning Bing Maps Api. Packt Publishing, Limited.
http://ebookcentral.proquest.com/lib/hamk-ebooks/detail.action?docID=1564353
Smyth, N. (2020). Android Studio 4.1 development essentials (Kotlin edition). Payload Media, Inc.
SQLite. (2022, April 27). Datatypes In SQLite. https://www.sqlite.org/datatype3.html#type_affinity
SQLite. (2023, October 10). About SQLite. https://www.sqlite.org/about.html
SQLite. (2024, March 13). How SQLite Is Tested. https://www.sqlite.org/testing.html#i_o_error_testing
Stack Overflow. (2023, February 6). Most used web frameworks among developers 2023 [Graph]. In
Statista. https://www.statista.com/statistics/1124699/worldwide-developer-survey-most-used-
frameworks-web/
StatCounter. (2024, January 8). Global market share held by mobile operating systems from 2009 to 2023, by
quarter [Graph]. In Statista. Retrieved February 27, 2024, form https://www-statista-
55
com.ezproxy.hamk.fi/statistics/272698/global-market-share-held-by-mobile-operating-systems-
since-2009/
West, D. (n.d.). A Deep Dive into Scrum Team Roles. Atlassian. Retrieved March 21, 2024, from
https://www.atlassian.com/agile/scrum/roles
Yuen, S. (2017). Mastering Windows presentation foundation: Master the art of building modern desktop
applications on Windows.
Zlatinov, Z., & Angelova, N. (2023). Web application of movie catalogue with React. SHS Web of
Conferences, 176, 2012. https://doi.org/10.1051/shsconf/202317602012
Appendix 1/1
Appendix 1: Material management plan (this is must for all)

In the time of writing this thesis three copies of this document were constantly saved, one on the
authors’ C drive, the other on HAMK’s provided OneDrive for students, and the last on author’s
iCloud. Copies were uploaded to the cloud providers each time new information is recorded and
when the writing session is over to ensure the text is accessible in case the device was damage or
stolen. Additionally, the material used such as references in Zotero, and note documents were kept
for one year after the submission of the work. Unnecessary material is disposed of properly after
the one-year mark. After submission the thesis is available on the Theseus platform.

Development project:

During the development of the project, Kanban (chapter 5.2) was used to create tasks and follow
the progress of the development. Mobile application’s programming code is stored on the C drive
of the author’s device and backed up in a public GitHub repository. GitHub was used as a version
control system during the development process. The code in GitHub remains in the author’s
repository for reference.
Appendix 2 / 1

Appendix 2: Expense Tracker Application

Differences in the Form State:


Appendix 2 / 2

Xaml Form Controls in Maui and Avalonia


Appendix 2 / 3

Pull Down Refresh Animation Behavior


Appendix 2 / 4

Selecting a Location Behavior


Appendix 2 / 5

Expense Locations’ Views


Appendix 2 / 6

Current Location Issues with Android Emulator

You might also like