Book Image

JavaScript at Scale

By : Adam Boduch
Book Image

JavaScript at Scale

By: Adam Boduch

Overview of this book

Have you ever come up against an application that felt like it was built on sand? Maybe you've been tasked with creating an application that needs to last longer than a year before a complete re-write? If so, JavaScript at Scale is your missing documentation for maintaining scalable architectures. There's no prerequisite framework knowledge required for this book, however, most concepts presented throughout are adaptations of components found in frameworks such as Backbone, AngularJS, or Ember. All code examples are presented using ECMAScript 6 syntax, to make sure your applications are ready for next generation browsers.
Table of Contents (12 chapters)
11
Index

Triggering routes


The most common route trigger is in the form of a user clicking a link within our application. As discussed in the preceding section, we need to equip our link generating mechanism to handle many pages, and many URIs. Another dimension of this scaling influencer is the actual triggering actions themselves. For instance, with smaller applications, there are obviously fewer links. So this also translates to fewer click events from the user—more navigation choices means higher event triggering frequency.

It's also important to consider the lesser known navigation actors. These include redirecting the user in response to some backend task completing, or just a straight-up work-around, to get from point A to point B.

User actions

When the user clicks a link in our application, the browser picks this up and changes the URI. This includes the entry point into our application—maybe from another web site or from a bookmark. This is what makes links and URIs so flexible, they can come...