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
About the Author
About the Reviewers

Areas of communication responsibility

When thinking about JavaScript component communication, it's helpful to look at the outside world, and the edges from which our application touches it. We've mostly been focused on inter-component communication thus far—how do our components talk to other components within the same JavaScript application? This inter-component communication doesn't initiate itself, nor does it end here. Scalable JavaScript code needs to consider the events that flow into and out of the application.

Backend API

The obvious starting point is the backend API, since it defines the domain of our application. The frontend is really just a facade for the ultimate truth of the API. Of course, it's more than that, but the API data does ultimately constrain what we can and cannot do with our application.

In terms of components and responsibilities, it's helpful to think about which ones are responsible for communicating directly with the backend. When the application needs data, it...