3 Architecture

WHAT YOU WILL LEARN IN THIS CHAPTER:            

  • Communication between AngularJS components
  • Structuring infinite scrolling with AngularJS
  • Running A/B tests with AngularJS modules
  • Structuring application files based on project size
  • Organizing your application with a module loader
  • Best practices for structuring user authentication

WROX.COM CODE DOWNLOADS FOR THIS CHAPTER

You can find the wrox.com code downloads for this chapter at http://www.wrox.com/go/proangularjs on the Download Code tab.

WHY IS ARCHITECTURE IMPORTANT?

Readability and maintainability are two fundamental requirements when working on any project. Attempting to contribute to a poorly organized and architected application can be extremely frustrating and severely affect developer productivity. Spending a bit of time upfront thinking about how an application’s files and JavaScript modules will be organized can save time and money later down the line, especially on larger projects with many contributing developers. In this chapter, you learn various techniques for organizing the many components provided by AngularJS, using best practices and conventions reinforced by the community. You are exposed to various techniques for communicating data between AngularJS components effectively, so you can make intelligent decisions when designing the architecture for your next application.

This chapter is broken up into five sections. In the first section, you get a high-level overview of the primary components ...

Get Professional AngularJS now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.