Migrating Enterprise Single-Page Application to Server-side Renderable Application

Loading...
Thumbnail Image

URL

Journal Title

Journal ISSN

Volume Title

School of Science | Master's thesis

Date

2024-11-24

Department

Major/Subject

Computer Science

Mcode

Degree programme

Master's Programme in Computer, Communication and Information Sciences

Language

en

Pages

100

Series

Abstract

Single-Page Applications in the web are utilizing Client-side Rendering (CSR) as an enabler of interactive web pages, but issues with this approach are becoming increasingly problematic. Server-side Rendering (SSR) has emerged as a solution to these issues. Yet, adoption of SSR has not yet reached its full potential. This thesis examines this gap by answering the following questions: What are the motivations for migration from a CSR application to an SSR application? What feasible options exist to enable SSR in a web application? And lastly, what are the potential pitfalls in migration of enterprise web applications to SSR? A three-phase approach was used to answer these questions. First, a Laboratory Study was conducted where a lightweight CSR application was researched for the purposes of migration to an SSR-enabling framework. Second, an enterprise Case Study was conducted to research the variety of codebase obstacles that block the migration. Lastly, solutions to these obstacles were tested and demonstrated in the application provided in the Laboratory Study. The research found that the current landscape of meta-frameworks are very capable in providing server-based rendering methods to a web application. The meta-framework Astro can seamlessly switch between CSR, SSR, and SSG, while providing other benefits such as file-based routing. However, the Case Study showed that obstacles in enterprise application blocking or hindering the benefits of a meta-framework are many and varied. While individual obstacles could be solved in the context of the lightweight Laboratory Study application, the depth of these obstacles in the enterprise CSR application makes full migration very laborious. These obstacles range from heavy usage of browser-only techniques that cannot be executed on the server, to limited modularization of code and architectural technical decisions that hinder the server-side renderability of the application. This makes migration to a meta-framework a very lengthy and difficult project. Companies must conduct a cost-benefit analysis of going through such a lengthy migration, as the immediate benefits of including a meta-framework are minor without significant refactoring of code.

Internetin Yhden Sivun Sovellukset (SPA) käyttävät asiakaspuolen renderöintiä (CSR) tuottaakseen interaktiivisia käyttäjäkokemuksia, mutta tämä renderöintimenetelmä ei ole täysin ongelmaton. Palvelinpuolen renderöintiä (SSR) on ehdotettu ratkaisuksi CSR:n ongelmiin, mutta SSR:n käyttö ei vielä ole ollut laajamittainen ratkaisutapa. Tämä työ tutkii ongelmakenttää seuraavien kysymyksien kautta: Mitä syitä on olemassa migraatiolle CSR-sovelluksesta SSR-sovellukseen? Mitä vaihtoehtoja löytyy SSR-migraation suorittamiseen? Viimeiseksi, mitä ongelmakohtia laajamittaisten yrityskäytön sovelluksista löytyy jotka vaikeuttavat migraatiota SSR:ään? Työ hyödynsi kolmivaiheista menetelmää kysymysten tutkimiseen. Ensimmäiseksi laboratoriotutkimuksessa kevyttä CSR-sovellusta käytettiin migraation suorittamiseen SSR:ää tukevaan web-sovelluskehykseen. Toiseksi tapaustutkimuksessa yrityskäytössä olevaa laajamittaista CSR-sovellusta käytettiin koodipohjasta löytyvien migraatioesteiden tutkimiseen. Viimeiseksi, ratkaisuja tapaustutkimuksen ongelmiin esitettiin laboratiotutkimuksen sovelluksen avulla. Työssä huomattiin, että modernit meta-sovelluskehykset ovat erittäin päteviä mahdollistamaan palvelinpuolen renderöinnin web-sovelluksissa. Meta-sovelluskehys Astro mahdollistaa sujuvan vaihdon CSR:n, SSR:n ja SSG:n välillä, tuoden myös muita ominaisuuksia, kuten tiedosto-pohjaisen reitityksen. Tapaustutkimuksen yrityssovelluksen migraatiossa havaittiin kuitenkin monia migraatioesteitä. Näihin esteisiin pystyttiin esittämään yksittäisiä ratkaisuja laboratoriotutkimuksen sovelluksessa, mutta ongelmakohtien laajuus tekee koko yrityssovelluksen migraatiosta erittäin työlästä. Ongelmakohdat vaihtelevat laajasta selainrajapintojen käytöstä rajoittuneeseen sovelluskoodin kapsulointiin sekä muihin teknisiin ratkaisuihin jotka rajoittavat SSR:n hyötyjä sovelluksessa. Nämä esteet ja ongelmat tekevät migraatiosta meta-sovelluskehys Astroon erittäin pitkän ja vaikean prosessin. Yritysten täytyy punnita sovelluksen migraatioon liittyviä hyötyjä ja sovelluksen koodipohjan ongelmista johtuvaa migraation raskautta, koska ilman laajamittaista koodipohjan refaktorointia meta-sovelluskehyksen hyödyt voivat jäädä pieneksi.

Description

Supervisor

Vuorimaa, Petri

Thesis advisor

Paananen, Juha

Keywords

server-side rendering, SSR, client-side rendering, CSR, single-page application, SPA, web development, software development, meta-frameworks, astro, react

Other note

Citation