3 Reasons Why Single Page Applications Are On the Rise
Imagine that once you are on a website and every link opens like lightning. This is indeed possible and very much in use.
Google Maps is a huge example of single page web applications.
When you open Google Maps a single page loads. As you move around new data appears without the reloading of the page. This becomes possible by the help of Ajax Calls. We'll get to the technicalities in a little while but first, let's take a look at the giants who are using SPAs and learn why they are using it.
Before Moving Forward
Let me tell you how to spot a single page application. A single, simple, simple technique.
Continuous or forever scrolling = Single Page Applications
Reason To Rise # 1 : Faster Response Time
With single page applications, everything happens fast. Since the need for a page reload is mitigated, it is only data that is updated.
Take the example of a Facebook news feed. You keep on scrolling and new post keep on appearing without any delay.
Imagine if you had to click a link on Facebook that would take you to the next 10 posts. Feels weird right? It would also be freaking slow.
Thus, due to the speedy delivery of SPA, they are on the rise with social media platforms and many more websites that strive for instant response.
A Nugget Of Truth
Google's Spread Sheet are also a form of single page application.
Reason To Rise # 2 : Requires Less System And Server Resources
No matter how old or banged up the system is. Doesn't matter what version of Android is installed on your cell phone. SPAs still run as smooth as ever.
This is because this style of web page requires fewer system resources and fewer server resources. This is a win-win case for both the enterprise and the user.
Enterprise can focus on on the server side and leave the layout building to the client side and vice versa.
One Important Thing To Remember
Tell Amazon To Use SPA. Only then there search will not be as slow as a snail.
Reason To Rise # 3 : Great For Developers
Now comes the technical part, hold tight, I promise I won't go overboard.
The server side and the client side... are two different aspects. Obviously.
Normally a single team has to work on both, but with single page applications two different teams can work on these two sides... separately, at the same time... get it?
Front-end developers can focus on bringing you the best looking application, easy to navigate and easy to understand. All the while, back-end developers can focus on making the application work flawlessly without any bugs, broken links, and excellent functionalities.
Now That We Understand the Basics, Let's Go Overboard
Here are some unnecessary details that non-technical people can skip if they want to. Nerds like me, gather around, this is for you:
1: During a regular page reload, what actually happens is that when you click a link, a request is sent to the server. The server, in response, generates a new HTML page. The rendering of this new page triggers a page reload in the browser. Once the reload is complete the new page takes the place of the old one.
2: With single page applications the first page renders just like an ordinary HTML page, the magic happens after that. Once SPA loads all the future request are handled and happen thought AJAX calls.
3: When you send a new page request from a single page application, now that the requests are being handled by AJAX, instead of a new HTML page, the server sends only data. This returned data fills the fields that are already there loaded the first time you visited the web application.
For the Nerds Who Are Still Hungry For More Details
- Single Page Application | Popularity And Future
The popularity of single page application will only grow further. As Google Maps, Facebook and twitter already use the technology, more big names are soon to follow.
A One Last Shutout To All the Regular Folks
If you like what you read then tell me in the comments. I will write more content to make you acquitted with the latest technology in a understandable way so that even any regular Joe can interpret what is actually happening behind the scenes in technology.