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

Chapter 5. Addressability and Navigation

Applications that live on the web rely on addressable resources. The URI is an essential internet technology. It eliminates a whole class of complexity, because we can encode bits of information about resources into URI strings. That's the policy part. The mechanism part is up to the browser, or our JavaScript code—looking up the requested resource and displaying it.

In the past, processing URIs took place in the backend. The browser's responsibility, when the user passed it a URI, was to send this request to the backend and display the response. With large-scale JavaScript applications, this responsibility has shifted mostly to the frontend. We have the tools to implement sophisticated routing in the browser, and with that, there's less reliance on backend-technologies.

The benefits of frontend routing do come at a cost, however, once our software packs on features. This chapter takes a deep look into the routing scenarios that we're likely to encounter...