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

Configuring behavior


The behavior of our components is largely self-contained, if implemented well. What they expose to the outside world are preferences that make subtle adjustments to their behavior. This could be something that's internally-focused—such as the type of model that's used, or the preferred algorithm. It could be something that's user-facing, such as enabling components, or setting display modes. It's these preferences that help us scale our components to work in a variety of contexts.

Enabling and disabling components

Once our software reaches a certain critical mass, not all features will be relevant to all users. The simple ability to toggle components between an enabled/disabled state is a powerful tool. Both for us, as a software vendor, and for our customers. For example, we know that some features are required by certain user roles in our software, but they're not the common case. To better optimize for the common user, we may choose to disable certain advanced features...