Book Image

JavaScript at Scale

By : Adam Boduch
Book Image

JavaScript at Scale

By: Adam Boduch

Overview of this book

Table of Contents (17 chapters)
JavaScript at Scale
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Summary


This chapter went into detail on addressability, and how to achieve this architectural property as our application scales.

We began our discussion of routing and addressability with a look at the different approaches to routing—the hash change event and utilizing the history API available in modern browsers. Most frameworks abstract the differences away for us. Next, we looked at the responsibilities of routers, and how they should be decoupled from other components through triggering events.

The design of URIs themselves also plays a role in the scalability of our software, because they need to be consistent and predictable. Even the users can use this predictability to help themselves scale the use of our software. URIs encode information which is then relayed to our handlers that respond to routes; this also needs to be taken into consideration.

We then looked at the various ways in which routes are triggered. The standard approach here is to click a link. If our application is well...