Single-page applications and Multi-page applications

Let’s meet SPA and MPA real quick!

Muhammad Ovi
2 min readAug 9, 2018

You remember this cassette we used to listen to our favorite songs? But it has some fixed number of songs — and in order to listen to other songs, we had to remove the cassette from the player and insert a new one.

But now, we have smartphones, Flash Memory Cards, HDDs, SDDs, and many thing where we can store 100s and 1000s of songs in one place and listen to them without the hassle of removing and entering them again and again…

Let’s take this example for modern-day websites!

In the old traditions — according to the modern web design/development: The case was: A web application would be composed of multiple different pages. In order to create a new view, an entirely separate page containing that view had to be loaded.

Here comes the thing! A more modern approach is to create single-page applications. A single-page application is composed of multiple views but only a single page.

Instead of multiple pages to be called separately and a new page being loaded each time when a new view is needed, a single page containing all possible views is loaded up-front and the active view can be dynamically toggled on (shown) and the other part of that page is hidden and waiting to be called.

Let’s say you have a page where you have a login page. While on your main page you are showing some cool stuff. So if I want to log in I’d click that button and it will take me to a separate page where I’ll be able to log in — But not in the SPA case. In Single Page Apps you click on that sign-in button and it dynamically shows you the login part on the same page (that’s pretty fast rather than going to another page) and hides the unnecessary things from the page. “That’s SPA”

That’s all folks! Will meet in the next story with something interesting.

If you found this story useful, you know what to do now. Hit that clap button and follow me to get more articles and tutorials on your feed.

For more blog post: visit my website

--

--