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

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...