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

Mapping features to components


Now that we have a handle on the most common JavaScript components, and the ways we'll want to extend them for use in our application, it's time to think about how to glue those components together. A router on it's own isn't very useful. Nor is a standalone model, template, or controller. Instead, we want these things to work together, to form a cohesive unit that realizes a feature in our application.

To do that, we have to map our features to components. We can't do this haphazardly either—we need to think about what's generic about our feature, and about what makes it unique. These feature properties will guide our design decisions on producing something that scales.

Generic features

Perhaps the most important aspects of component composition are consistency and reusability. While considering the scaling influences our application faces, we'll come up with a list of traits that all our components must carry: things such as user management, access control,...