Comparing the Use of a Purely Functional Programming Language to Event-driven JavaScript in Modern Web Application Development
Salmi, Enni (2020)
Salmi, Enni
2020
Ohjelmistokehityksen maisteriohjelma, FM (engl) - Master's Degree Programme in Software Development
Informaatioteknologian ja viestinnän tiedekunta - Faculty of Information Technology and Communication Sciences
This publication is copyrighted. You may download, display and print it for Your own personal use. Commercial use is prohibited.
Hyväksymispäivämäärä
2020-05-20
Julkaisun pysyvä osoite on
https://urn.fi/URN:NBN:fi:tuni-202004294357
https://urn.fi/URN:NBN:fi:tuni-202004294357
Tiivistelmä
The functional programming paradigm has gained some popularity in the field of web development during the past few years, yet no functional programming language is among the most popular languages for web development. The advantages of using the functional programming paradigm in web development are not well researched, and although the program code of event-driven user interfaces is often written in a style inspired by functional programming, its full potential is rarely utilised. The aim of this thesis is to study and compare the advantages and disadvantages of using different levels of the functional programming style in event-driven web front ends, and to assist developers who are not certain which approach to choose for their projects.
The research is conducted by programming three versions of the same application using different development approaches. Two of the applications are written in JavaScript using the popular UI library React, and one in the purely functional programming language Elm. One of the JavaScript applications represents a popular event-driven approach without emphasis on functional programming, and the other a similar approach with more characteristics closer to functional programming. The applications are compared in terms of development process, code complexity, architecture, compilation time and testability.
The results of the research suggest that using the functional programming paradigm, especially with a purely functional programming language, can significantly improve the compilation process, architecture and testability of a web application. However, since functional programming languages have remained less widely used in web development, it can be more difficult to find technical support for developing certain features or for writing automated tests. Using a functional programming language in web front ends is a good alternative with many benefits, but the language libraries would require more support and active developers to stay up-to-date with the constantly changing technologies.
The research is conducted by programming three versions of the same application using different development approaches. Two of the applications are written in JavaScript using the popular UI library React, and one in the purely functional programming language Elm. One of the JavaScript applications represents a popular event-driven approach without emphasis on functional programming, and the other a similar approach with more characteristics closer to functional programming. The applications are compared in terms of development process, code complexity, architecture, compilation time and testability.
The results of the research suggest that using the functional programming paradigm, especially with a purely functional programming language, can significantly improve the compilation process, architecture and testability of a web application. However, since functional programming languages have remained less widely used in web development, it can be more difficult to find technical support for developing certain features or for writing automated tests. Using a functional programming language in web front ends is a good alternative with many benefits, but the language libraries would require more support and active developers to stay up-to-date with the constantly changing technologies.