Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
JavaScript at Scale

You're reading from   JavaScript at Scale Build web applications that last, with scaling insights from the front-line of JavaScript development

Arrow left icon
Product type Paperback
Published in Jul 2015
Publisher
ISBN-13 9781785282157
Length 266 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Adam Boduch Adam Boduch
Author Profile Icon Adam Boduch
Adam Boduch
Arrow right icon
View More author details
Toc

Table of Contents (12) Chapters Close

Preface 1. Scale from a JavaScript Perspective 2. Influencers of Scale FREE CHAPTER 3. Component Composition 4. Component Communication and Responsibilities 5. Addressability and Navigation 6. User Preferences and Defaults 7. Load Time and Responsiveness 8. Portability and Testing 9. Scaling Down 10. Coping with Failure Index

Communication data schema


Event data isn't opaque—it has meaning that our callback functions use to make decisions on how to react. Sometimes, this data is unneeded and can be safely ignored by the callback function. However, we don't want to decide, early on, that some callback added later on isn't going to need this data. And that's something that helps our communication mechanism scale—providing the right data in the right place.

Not only does the data need to be there, readily available for consumption by each callback function, but it also needs to have a predictable structure. We'll look at approaches to establish naming conventions for the event names themselves, as well as the data that's passed along to the handler functions. We can make inter-component communication a little more transparent, and thus more scalable, by making sure that the required event data is present and unlikely to be misinterpreted.

Naming conventions

Coming up with meaningful names is hard, especially when there...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image