Single Page Applications (SPAs) and their business value

Single Page Applications, or SPAs for brevity, have been all the rage in the tech world for the past few years. But as developers, should we obsess and geek out about SPAs, or does this technological advancement also translate into immediate business value?

Single Page Applications and the frameworks in which they are developed have introduced groundbreaking changes to how we write and think about code. However, the underlying technology itself holds little to no interest for business owners and stakeholders. It is our responsibility to evangelize the benefits of SPAs to business owners and demonstrate how it can benefit them.

Why Single Page Applications (SPAs)

Almost 60 percent of web traffic comes from mobile devices, and smartphone users spend over an hour daily on various mobile applications. This indicates that smartphone users have become accustomed to a specific look and feel of apps on their devices. Single Page Applications (SPAs) aim to replicate that mobile app experience within the device's browser, eliminating the need to install a dedicated mobile application from an app store.

SPAs offer a mobile app-like experience by eliminating the need for page refreshing as users navigate between sections. Upon accessing the website, all pages are loaded initially, and when the user switches to a different page, it is seamlessly rendered on the screen without requiring internet loading. This, coupled with Server Side Rendering (SSR), a development technique that adds to the magic, results in a blazing fast and mobile-native experience for your website's users. To illustrate this further, let's consider the following example.

A traditional web page, such as the invaluable indeed.com website, refreshes and reloads the requested page with every user request.

traditional-webpage.gif
A traditional website will refresh every single time a new page is requested.

 

Notice the spinning wheel in the top left corner every time the user modifies the search inputs? It signifies that the browser sends a request to the web page server, which generates a new page based on the user's inputs and sends it back to the browser. This back-and-forth communication between the browser and server noticeably impacts the overall load time. Moreover, this process creates a flow that mobile users are unaccustomed to. Mobile users are not accustomed to the page flashing white during the refresh before the new web page is fetched and rendered.

This is something that a mobile user would expect to see.

spa-webpage.gif
The web page is fetched once during the initial load and remains static without any subsequent refreshes upon user requests.

 

And when switching to the mobile website, the look and feel of the website are identical to that of a mobile app that the user downloads and installs on their mobile device.

 

spa-webpage-mobile.gif
The  mobile web page behaves exactly like a mobile app.

 

Now, the mobile user is greeted with a web page that behaves in a familiar way, providing a better user experience (UX). A pleasant experience on your web page can benefit your business, just as a good user experience on-site does. No waiting, no refreshing, and no white blank pages with no content.

While providing a better and familiar user experience is crucial for every web page, whether it is a Single Page Application or a traditional one, SPAs offer an additional benefit. In order for your web page to avoid refreshing, all static content needs to be preloaded. Static content refers to elements that are not data-related and their appearance remains unchanged unless a new web page is designed, such as a navigation bar or overall layout. These elements are fetched and rendered only once during the initial payload. On the other hand, the remaining data, such as different magazine covers, is fetched upon request and then rendered on the page without the need to reload the entire page. This approach reduces loading time for your website, as it only renders what is necessary.

The speed magic doesn't end here, though. Remember when I mentioned Server Side Rendering (SSR) earlier? While attempting to avoid technical complexities, I'll do my best to explain what it entails. When a browser requests a website, the server sends back an HTML file that the browser needs to render. However, with SSR, the server takes on the responsibility of rendering the page itself. It generates a fully rendered HTML website and sends it back to the browser, relieving the browser and the computational device from that task.

Now, let's consider the scenario where the computational device is a mobile device. If it's the latest flagship model from a mobile manufacturer, it can handle the task quite well. However, what if the mobile device is a low-end budget one? Its processing power is not nearly as strong as the flagship model. Additionally, not everyone has access to high-speed internet or resides in areas with robust network coverage. In such cases, opting for a SPA instead of a traditional web page becomes crucial.

By offloading the rendering of the web page to the server, which has superior computational capabilities, you alleviate the burden on the mobile device. Moreover, rendered HTML pages are lighter compared to HTML files, enabling faster transmission over the internet. This combination of factors ensures the best possible experience for your users and potential clients, regardless of their device and network conditions.

If the concept of Single Page Applications sparks your interest and you believe they could benefit you and your business, I invite you to click the button below to schedule a meeting. During our discussion, we can explore in-depth how a tailored SPA solution can be customized to meet your specific needs.

Bring your business to the next level.

The github logoThe linkedin logo