d8888888b    888 .d8888b.888888888888888888888Y88b   d88P  .d8888b. 8888b
       d888888888b   888d88P  Y88b   888    888        Y88b d88P  d88P  Y88b88888b
      d88P88888888b  888Y88b.        888    888         Y88o88P   888    888888?88b
     d88P 888888Y88b 888 "Y888b.     888    8888888      Y888P    888       888 ?88b
    d88P  888888 Y88b888    "Y88b.   888    888           888     888       888  ?8bb
   d88P   888888  Y88888      "888   888    888           888     888    888888   ?8bb
  d8888888888888   Y8888Y88b  d88P   888    888           888  d8bY88b  d88P8888888888b
 d88P     888888    Y888 "Y8888P"    888    8888888888    888  Y8P "Y8888P" 888     ?88b
Articles

The Problem With Single Page Applications

April 4th, 2017

Single Page Applications have become the newest craze sweeping the web. Frameworks such as Angular and ReactJS are hugely popular and driving this current trend. However, besides the cool factor, are SPAs really a good design choice for most websites?

What is a SPA?

A traditional website, such as this one, requires refreshing pages during navigation - each new page pulls content from either the server or the browser cache (for example, clicking "next page"). In contrast, A Single Page Application is a webpage that loads the HTML, CSS and Javascript once, and afterwards the content within the page is modified as needed using asynchronous Javascript calls. Usually this relies on separate microservices responsible for handling those requests. The advantage to an SPA is a more interactive user experience, but the trade-off is a lot of extra code and complexity over a traditional website.

Single Page Applications are not a new concept - Using Ajax requests to asynchronously modify elements of a web page dates back more than a decade and a half, and if used appropriately can vastly enhance a user's website experience. An SPA is essentially an extension of that idea, making the entire website function similarly to a desktop application. In some cases, this is a very good idea (for example, Google Docs). By blurring the line between a desktop and web application, it now becomes possible to move some some of these applications into the web, which has many advantages - but some significant disadvantages as well.

What's wrong with SPAs?

My point here isn't that SPAs are bad - on the contrary, there are plenty of well designed SPAs that are brilliant in their implementation. The problem is, as is so often the case, the misuse of this technology. SPAs have a very narrow range of usable applications, but due to the recent explosion of frameworks many websites are built as an SPA when they should not be. I largely attribute this problem to the current design trends, and eager developers with a solution looking for a problem.

The vast majority of typical websites should not be built as an SPA. To that end, I certainly hope that no website design firm chooses to build a company website using an SPA (I say that tongue-in-cheek, because I know there are).

 Previous Page123

Home - Geocaching - PHP Scripts - Articles - Music - Programming - Hot Sauce Review
About This Site - Site Search - About Me - Link Directory - Contact Me

This site was constructed entirely by hand { more info }
Modified Tuesday, April 4th 2017 UTC

(C) Copyright 2000-2017 Marty Anstey ~~ I didn't rip you off, so don't rip me off.