Declarative methodforcreating multiplatform applications
DOI:
https://doi.org/10.33216/1998-7927-2022-275-5-10-15Keywords:
MVIKotlin, Decompose, Android, Kotlin, Store, Common, Jetpack Compose, Kotlin MultiplatformAbstract
The work provides an analysis of modern analogues of cross-platform and multi-platform application development, the Kotlin Multiplatform and Jetpack Compose development tools are investigated. The business logic and methodology of creating a user interface for several platforms are described, which contributes to reducing the cost of the product and accelerating its development. The method of developing a multi-platform application for Android, Windows, Linux and macOS operating systems is presented, which allows you to create background waves in sound format. The principles of declarative programming and frameworks for multi-platform development are studied. For the software implementation of individual native applications, native solutions have been chosen. This solution is facilitated by the use of Kotlin Multiplatform frameworks, which allows you to create universal application logic code, in combination with the Compose Multiplatform UI framework. Their use makes it possible to write a single logic code and application interface for several platforms at the same time, which helps to save time and avoid a significant number of errors. A methodology for developing the architecture of Android application components is proposed. The modular structure of the project architecture is divided into two parts: a common module, which contains the main logic of the application, as well as platform implementations of components, and platform modules that perform initialization and launch of the application on a certain platform. The business logic contract of components implemented in Store interfaces is described. The formation of the melody format of the application from three classes is shown: Song, Track and Chord.. A special utility has been created to reproduce sounds. It downloads sounds from the application's resources and plays them with the necessary musical tone. Sounds are stored in the shared module resources as MP3 files. Dependency implementation is used to establish access to repositories from application business logic components. The logic of implementing dependencies is described in Koin module files. A methodology is proposed that summarizes the methodology of developing multi-platform applications in the Kotlin programming language and the use of a declarative approach for the development of user interfaces for several platforms.
References
1. Xamarin documentation. URL: https://docs.microsoft. com/en-us/xamarin/ (дата звернення: 25.12.2022).
2. React Native. URL: https://reactnative.dev/ (дата звер-нення: 25.12.2022).
3. Flutter. URL: https://flutter.dev/ (дата звернення: 25.12.2021).
4. Как Kotlin Multiplatform помогает сократить время ра-зработки приложений. URL: https://habr.com/uа/ post/ 525888/ (дата звернення: 25.12.2022).
5. Почему мы выбрали Kotlin одним из целевых языков компании. Часть 2: Kotlin Multiplatform. URL: https://habr.com/ru/company/domclick/blog/499820/ (дата звернення: 25.12.2022).
6. Declarative Programming: Is It A Real Thing?. URL: https://www.toptal.com/software/declarative-programming (дата звернення: 25.12.2022).
7. Understanding Jetpack Compose – part 1 of 2. URL: https://medium.com/androiddevelopers/understanding-jetpack-compose-part-1-of-2-ca316fe39050 (дата звер-нення: 25.12.2022).
8. Kotlin Programming Language. URL: https://kotlinlang.org (дата звернення: 25.12.2022).
9. Козуб, Г., Козуб Ю., Могильний Г., Жуков А. «Розро-бка мобільного Аndroid-додатку з застосуванням принципів Сlean Аrchitecture». Вісник Східноукраїнсь-кого національного університету імені Володимира Даля, вип. 5 (269), Вересень 2021, с. 5–10, doi:10.33216/1998-7927-2021-269-5-5-10.
10. Android MVI-Reactive Architecture Pattern. URL: https://abhiappmobiledeveloper.medium.com/android-mvi-reactive-architecture-pattern-74e5f1300a87 (дата звернення: 25.12.2022).
11. MVIKotlin Overview. URL: https://arkivanov.github.io/ MVIKotlin/ (дата звернення: 25.12.2022).
12. Жуков А. В., Козуб Г.О. Застосування фреймворку Jetpack Compose у багатомодульному Android-додатку. Вітчизняна наука на зламі епох: проблеми та перспе-ктиви розвитку : Зб. наук. праць. Переяслав, 2021. Вип. 67. С.109–111.