O'Reilly logo

Serverless Single Page Apps by Ben Rady

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 2Routing Views with Hash Events

In the last chapter, we deployed the first version of our web application…but it’s really more of a static website. The call to action button doesn’t do anything, and we only have one view. We need to add more views to our app, but we also need these views to be dynamic, responding to the user’s actions and providing an interactive experience.

On a static website, the content on each page is fixed, and navigation is controlled through hyperlinks to other pages. Traditional MVC web frameworks improve this by using a server-side router that associates URLs with controllers, which use views and models to create dynamic content. Single page apps improve upon this even further by moving the routing logic into ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required