arrow-to-top
Single Page Application

! Single Page Application

Single Page Application

Technologies used to create and improve internet applications growing up so dynamically that what’s modern today, tomorrow can be outdated. SPA was created years ago but now programmers still use it to develop modern applications. But what exactly is SPA?  It’s an acronym of “Single Page Application”. Often it’s wrongly interpreted as “One Page” websites and both sounds similar but they are completely different concepts.

 

According to Wikipedia SPA is an application or website which at the beginning loads all source code needed to work. It doesn’t require to reload or refresh a page during use because its components interacts with user and change dynamically. In turn “One Page” websites are static and the only interaction is scrolling the page. MPA (“Multi Page Application”) is application that works in “traditional” way sending requests to server generating in responses new pages.

 

Why SPA?

The most of all SPA are very efficient because resources needed to work are downloaded just once. Additionally using local and cache memory user is able to storage data even offline. Developing process of SPA is also easier for developers because they not have to write code which renders new pages on server-side. Also whole backend logic can be reused in mobile application. Another advantage for developer is easy debugging SPA using Google Chrome.

 

Disadvantages of SPA

Unfortunately it’s hard to optimize SPA for SEO because content of the page is loading dynamically. Of course technology growing up fast and today there are tools that allow developers to fix it but it’s time-consuming. Another problem is that a lot of applications use heavy frameworks which have to be loaded on client-side. Comparing to traditional applications SPA is also less secure because users can inject client-side scripts making a lot of damages. SPA is very efficient but memory leak in Java Script which can cause huge performance drop.

 

Why MPA?

Traditional applications which was mentioned before are MPA applications. They are larger and have many levels of UI (it could be solved using AJAX but when application developing process elongate). MPA is also easier for SEO optimization than SPA because developers can define keywords for each page. Another advantage of MPA is clear visual map of where to go and complex menu but it depends of users preferences.

 

Disadvantages of MPA

Unfortunately MPA is harder to implement than SPA for mobile. Developers also need to use frameworks either for server and client side. It significantly extends the production time.

 

SPA or MPA?

There is no unambiguous answer for this question. Both SPA and MPA can be used for same purposes. Another way is make hybrid using best features from SPA and MPA.