Navigating the Mobile Landscape: A Comparative Study of Native and Cross-Platform Development Approaches in Swift, Kotlin, and Kotlin Multiplatform
2024 (English)Independent thesis Basic level (degree of Bachelor), 10 credits / 15 HE credits
Student thesis
Abstract [sv]
Möjligheten att utveckla mobilapplikationer till olika plattformar med delad kod är en metod som i teorin bidrar till en kortare utvecklingstid, sänker kostnader och ökar effektiviteten gällande utveckling. Tekniken med plattformsöverskridande utveckling är uppåtgående och det finns idag ett flertal verktyg på marknaden för att utveckla applikationer med delad kodbas. Detta examensarbete undersöker kapaciteten av plattformsöverskridande applikationsutveckling med Kotlin Multiplatform jämfört med plattformspecifik applikationsutveckling med Kotlin och Swift. Två platformsspecifika applikationer utvecklas med hjälp av Kotlin och Swift, medan en plattformsöverskridande applikation är utvecklad med hjälp av Kotlin Multiplatform. Dessa applikationer är ställda mot varandra när det gäller prestanda, där åtkomsttider, processoranvändning och minnesanvändning är jämfört. Examensarbetet undersöker även upplevelsen att utveckla med Kotlin Multiplatform, där fokus ligger på kodkomplexitet, möjlighet att dela kod och avändandet av tredjepartsbiblioket. Applikationerna har inget verkligt användningsområde, utan är utvecklade som en miljö för testning av implementationsmöjligheter och prestandamätningar. De flesta funktioner i applikationerna använder någon plattformsspecifik funktion på enheten, exempelvis GPS eller lagring. Detta är för att undersöka hur bra platformsspecifika funktioner kan implementeras med hjälp av Kotlin Multiplatform och hur mycket kod som kan delas. Resultatet visar att platformsöverskridande applikationen presterar väl jämfört med den platformsspecifika applikationen på Android när det kommer till prestanda, medans den har en något mindre fördelaktig prestanda när den jämförs med den platformsspecifika iOS applikationen. Upplevelsen att implementera funktionaliteterna i Kotlin Multiplatform jämfört med platformsspecifika implementationerna visade sig ofta resultera i en mer komplex implementation med diverse kringående lösningar
Abstract [en]
The possibility to develop mobile applications for multiple platforms using the same code is an approach that in theory reduces development time, lowers costs and improves overall efficiency. The technology of cross platform development is uprising and there are today multiple tools on the market to build applications with shared codebase. This thesis project investigates the capacity of cross platform development using Kotlin Multiplatform compared native development using Kotlin and Swift. Two native applications are developed using Kotlin and Swift, and one cross platform application is developed using Kotlin Multiplatform. These applications are compared in terms of performance, where access times, CPU usage and memory usage is compared. The thesis also investigates the developer experience of Kotlin Multiplatform, where focus lies in code complexity, possibility to share code and usage of external libraries. The applications does not have a real world usage, but is developed as a testing ground for implementations and performance measurements. Most functionalities in the applications uses some sort of native function on the device, e.g GPS or storage. This is to investigate how well platform specific native functionalities can be implemented in Kotlin Multiplatform and how much code that can be shared. Results show that the cross platform application performs well compared to its native counterpart in Android when it comes to performance, while having a slightly less favorable performance compared to the native iOS application. The experience of implementing the functionalities of the application in Kotlin Multiplatform compared to native turned out to often result in more complex implementation with various workarounds needed to be made.
Place, publisher, year, edition, pages
2024. , p. 77
Keywords [en]
Kotlin, Kotlin Multiplatform, Swift, Cross platform development, Native development, Native functionality
National Category
Software Engineering
Identifiers
URN: urn:nbn:se:miun:diva-52019Local ID: DT-V24-G3-039OAI: oai:DiVA.org:miun-52019DiVA, id: diva2:1886828
Subject / course
Computer Engineering DT1
Educational program
Computer Science TDATG 180 higher education credits
Supervisors
Examiners
2024-08-052024-08-052024-08-09Bibliographically approved