O'Reilly logo

AngularJS: Up and Running by Brad Green, Shyam Seshadri

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 15. Guidelines and Best Practices

We covered a whole lot of stuff about AngularJS, and dove deep into almost every part of the AngularJS framework. We haven’t started scratching the surface of how deep and complex AngularJS can be, but we do have a strong base on the moving parts to start considering the bigger picture. In this chapter, our aim is to take a step back from AngularJS and consider it in the larger picture of your end-to-end web-based application. To that extent, we look at:

  • Testing
  • File and directory structure
  • Best practices
  • Building your application
  • Tools and libraries

We’ll talk about how to efficiently accomplish each one, and consider a way to perform them such as to ensure long-term maintainability and project health without reducing the velocity of development.

Testing

The first and foremost rule of web application development is that testing happens before the application development starts, while you are developing the application, and after you’ve finished development. We’ve tried to imbibe that mentality into this book by bringing up unit testing and end-to-end testing whenever applicable.

Test-Driven Development

Writing your unit tests and specifications up front is by far the best approach to building any large-scale, maintainable application using AngularJS. We covered some of the major reasons why you should unit test in AngularJS in Chapter 3. In this section, we cover some of the best practices and thoughts to keep in mind when approaching testing ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required