I came across this post, which challenged me to wrap my head around the simplest way to explain the basic concepts of Angular JS.
I used Angular JS as the framework for my final project in 2016.
Angular JS is now deprecated, but I still wanted to take a stab at explaining it to a 5 year old.
You throw a puppet show.
But you want to tell different stories with different characters and settings!
You could host each story on separate stages, all with a single set background, and specific puppet set assigned to that stage.
But wouldn't it be exhausting to go to different stages for each story?
How about telling stories with one stage, with an interchangeable background rig, and a variety of puppets?
You don't have to use a completely different stage and puppet set for each story
Princess and the Frog? Put up the castle background and bring up the princess and frog puppets.
Beauty and the Beast? Keep the princess puppet and the castle background, but put away the frog.
A story with a princess battling a beast in a forest? Change the castle background to the forest.
Want to tell a story about ducks in the forest?
You get my point.
Instead of having 3 separate stages for 3 different stories, you would have one stage, that can display many types of backgrounds, and frame varying puppets for any story you would like to tell.
I don't want my page to waste time and bandwidth to load a whole new page with the same nav bar, same logo, same title. Rather, I'd keep the nav bar, but change the content: add a form, add a gallery, load a video, etc.
TL;DR: The nav bar is the stage, the background and puppets are your content. Change the content on one stage.
Top comments (6)
Added the correction. Thanks for the reminder.
Also, there's AngularDart which is coming out with version 5. Just FYI. It's listed on the Angular.io website when you switch between the versions
I think you did a good job of explaining the concept of a Single Page Application.
I knew I had a sort-of misnomer here.