P.I. Bashtanov¹, P.A. Shapkin²
¹ˑ²National Research Nuclear University MEPhI (Moscow, Russia) ¹pavel@shapkin.link
Problem statement. In the modern world, there is a growing need to create cross-platform applications. However, existing libraries for building user interfaces often have limitations in the field of functional programming. This leads to difficulties in developing and supporting cross-platform solutions. The object of the study is the abstraction of side effects and streams in functional programming languages, their application to the development of user interfaces and implementation of the corresponding abstractions in the functional language Scala. Implementation is equipped with mappings to interpret the abstract structure as a mobile application interface based on the Java platform within Android and as a web interface based on Scala.js.
The goal of the work is to study the approach to creating cross-platform mobile application interfaces based on functional streams and to develop a library based on this approach. The methods of functional programming are used, as well as category theory constructs that provide the necessary building blocks for constructing and transforming event streams.
The practical significance of the proposed solution is to simplify application development by using a single approach to representing side effects both in the server and client parts. This increases the possibility of reusing ready-made code built on the principles of functional programming.
Obtained results include: an approach to building application interfaces based on functional streams; the "immui" library ("immutable UI") and a demo application based on created approach; responsiveness and resource consumption were tested in comparison with a native application based on Android views. It was found that the native application consumes less memory, but the conclusions regarding responsiveness are ambiguous, since the latter heavily depends on a specific usage scenario.
Bashtanov P.I., Shapkin P.A. Multi-platform library for building user interfaces based on functional streams. Information-measuring and Control Systems. 2025. V. 23. № 5. P. 7−14. DOI: https://doi.org/10.18127/j20700814-202505-01 (in Russian)
- Uzkikh G. Funktsionalnoe programmirovanie i ego vliyanie na kachestvo koda i obsluzhivaemost. Vestnik nauki. 2023. 8 (65). S. 317−318. https://cyberleninka.ru/article/n/funktsionalnoe-programmirovaniei-ego-vliyanie-na-kachestvo-koda-i-obsluzhivaemost (05.06.2025). (in Russian)
- Cats Effect 3 official documentation. https://typelevel.org/cats-effect/docs/ (22.06.2025).
- Pufek P. i dr. Achieving Efficient Structured Concurrency through Lightweight Fibers in Java Virtual Machine. 43rd International Convention on Information, Communication and Electronic Technology (MIPRO). 2020. S. 1752−1757. DOI: 10.23919/MIPRO48935. 2020.9245253.
- Ida Tetsuoand Tanaka J. Functional programming with streams. Part II. New Generation Computing. September 1984. T. 2. № 3. S. 261−275.
- fs2 official documentation. https://fs2.io (25.06.2025).
- Milewski B. Category theory for programmers. T. 12. Blurb. 2018.
- Tagless Final in Scala Quickly Explained. https://rockthejvm.com/articles/tagless-final-in-scala (05.06.2025).
- Carette J., Kiselyov O., Shan C.-C. Finally tagless, partially evaluated: Tagless staged interpreters for simpler typed languages. Journal of Functional Programming. 2009. T. 19. № 5. S. 509−543.

