Web

Single-Page Applications: A Curse or A Blessing?

The ongoing competition in the market forces businesses to search for the most state-of-the-art and effective digital solutions to promote their products and services. There is a bunch of options these days such as native mobile and desktop applications, websites, and web apps. All of them can be effective depending on the type of business, audience, location, purpose, etc. There are also some software products that can bring tremendous profits for one company, and be a complete disaster for the other. A single-page application (SPA) is one of such solutions. There is a lot to keep in mind if you are thinking about employing this technology.

How is a SPA distinct from a multipage app (MPA)?

The main difference between these two derives from their names. MPAs consist of several pages. A browser sends a request to a server each time a user сlicks on a tab to open a new page. A SPA is completely another story. When one launches it, the request sent to a server is only one. All the contents are loaded straight away. The browser manipulates the current page via JavaScript. It looks like a user is surfing between the tabs but, actually, stays on the same page all the time. SPAs are typically developed using frameworks such as Angular, JS micro frameworks, and libraries.

Strong points of SPAs

High loading speed

This pivotal point goes to a SPA. A user doesn’t have to reload the page, only data is sent over the wire.  Most of the back-end elements like Scripts, CSS and HTML are loaded only once. These facts guarantee the high loading speed of SPAs.

At the same time, the loading speed parameter is of crucial importance for businesses. No one is fond of waiting. According to the 2018 year stats, a required web page time load shouldn’t exceed 3 sec. It takes much more time for massive web apps or websites to load. For example, the research conducted by Google showed that the average loading time of a mobile landing page is 22 seconds. And yet 53% of the questioned people admitted they are likely to leave a page if it takes longer than 3 seconds to load.

Quicker to develop

SPAs are very quick to create. There are also various JavaScript frameworks as AngularJS, Ember.js, Meteor.js, which accelerate the process. Programmers don’t have to write the whole code from scratch. You can take advantage of other useful tools like Google Web Toolkit which allows developing the application in Java and translating the code into JavaScript.

Great user experience

SPAs significantly enhance user experience. Using this kind of applications creates the impression of dealing with a native app. The page doesn’t reload each time anybody enters new information or clicks a button to see part of an app’s contents. This peculiarity streamlines interaction with a page creating a more natural user experience.

Disadvantages

SEO optimization issues

SEO optimization is a well-known bugbear of SPAs. And the fear of this pitfall still discourages many from creating a SPA instead of MPA. The problem was related to page indexing. Special bots better known as web crawlers are used by search engines for visiting URLs in order to index them. It’ was impossible for these robots to reach the pages of a single-page application that actually has only one page. As a result, SEO metrics and ranking for this type of web solutions were unfavourable. Although Google managed to tackle the problem, SPAs are still regarded as a good option only for data storage, project management systems, CRM, etc.

JavaScript dependent

Apart from being browser dependent, as all the web apps are, single-page applications are built by means of JavaScript. This programming language ensures dynamical rendering of the page.  Some users still disable JavaScript in their browsers. They do so for security reasons. Some years ago, JS was known for making web apps vulnerable to hacker attacks. But it’s no longer the problem thanks to state-of-the-art security systems. Besides, the recent stats show that the popularity of this computer language is soaring. JS is used by 95 % of all websites worldwide. Therefore, this the situation when minus turns into a plus.

Data sharing issues

Actually, all web apps, including SPAs, are genuinely easy to share. A user can copy the link with an app and send it whoever he or she desires. But there is a problem with linking to a certain tab or some section of an app. In an MPA each tab usually has a separate page, but a SPA consists of only one page. Anyway, this issue has a solution as well.  The “#” or “hash” can be used to implement deep links for AJAX. The aim of a hash is to link to the anchor tag on the same page.

Did you know that you are a regular SPA user?

Single-page applications have already gained a firm foothold on the Internet. Curiously, many people don’t even realize that they have been using SPAs for years. Facebook, Twitter, Medium, Gmail – these world-famous web platforms are all created by means of SPA technologies.

When one can opt for a SPA

Despite all the benefits provided by single-page applications, relying on them is not always justified. There are several things to keep in mind while making a choice.

1. Company’s size and type.

SPAs perfectly suit for the promotion of one product, when there is no need in the variety of pages.  Large companies owning big web stores should bet on multipage applications.

2. Urgency (speed) of development

SPAs can become a lifeboat in case you need a ready-to-use digital solution as soon as possible. You can also rely on a SPA as a temporary app. Later on, you’ll be able to create a more complex app having a simple but working solution behind your belt. 

3. SEO-promotion.

Despite the progress in this direction, many search engines still don’t index single-page applications. Only Google managed to solve this problem. That’s why if you strongly count on SEO, it’s better to turn to MPAs.  

One more option – a hybrid app

A hybrid approach allows creating a SPA with synthetic pages that use URL anchors. This solution is as functional as an MPA and as convenient to navigate as a SPA. As a result, a hybrid app combines the best of both approaches.

Conclusion

So, is a single page application a curse or a blessing? The answer is something in between. It’s undeniable that using SPAs can offer significant advantages. But one should keep in mind that there is also a number of pitfalls that can play a decisive role in a particular case. Therefore, it’s better not to hurry, and allow business analysts to carefully study business requirements and give a piece of advice on what digital solution can be the most beneficial in the particular case: a single-page application, a multipage application or their hybrid.

Be the FIRST to Know - Join Our Mailing List!

Subscribe to our mailing list and get interesting stuff and updates to your email inbox.

Thank you for subscribing.

Something went wrong.

Previous ArticleNext Article
Alena Bogdanova is a Tech Journalist with Webix. She writes about mobile applications, healthcare software, web development, artificial intelligence, business, career, and more. You can contact Helena via ebogdanova@xbsoftware.by.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Send this to a friend