AngularJS Patterns: Clean Code
Learn how to write AngularJS code using battle tested patterns to produce code that is easier to maintain, debug, and scale.
What you'll learn
Once you learn the basics of AngularJS, you encounter decisions that not only affect how well your app will scale and perform, but also how easily it can be maintained. This course takes AngularJS developers beyond the fundamentals to address that next level of problems you encounter. You'll see familiar patterns such as Separation of Concerns (SoC) are at the heart of building solid AngularJS applications. You'll learn techniques to organize code and the right questions to ask yourself that can shape your application patterns. Other topics include: how to extend application design from small, to medium, to large scale apps with many modules, naming conventions, controller techniques, reusable services, creating reusable building blocks, dependency injection, and build automation. By the end of this course, you will have a solid understanding of how to write clean code with AngularJS to create greater implicit readability, make it easier to maintain, and extendable. Sample code for this course can be found here: https://github.com/johnpapa/ng-demos
Table of contents
- Introduction 1m
- Why We Care About Organization 1m
- Defining Sorting Boxes 1m
- By Type or By Feature 3m
- The LIFT Principle 5m
- LIFT in a Small App 3m
- LIFT as an App Grows 3m
- Choosing Naming Conventions 6m
- Tips for Designing Your App 3m
- Example Structure By Type 2m
- Example Structure By Feature 1m
- Summary 2m
- Introduction 1m
- Declaring the Module Dependencies 2m
- Three Categories of Modules 2m
- Custom Modules 1m
- Dependency Chains 2m
- Organization Strategies 4m
- Examining a Module Structure 3m
- Debugging Module Dependencies 4m
- Directives and Module Dependencies 2m
- Debugging Module Errors 4m
- Who Wins With Collisions? 4m
- Naming Tips 1m
- Summary 1m
- Introduction 1m
- The Role of a Controller 2m
- Nesting, Naming, and Dots 1m
- Nesting Controllers 3m
- Nesting Scopes Using Dots 3m
- Nested Scopes With Controller As 3m
- Controller As Variables in HTML 2m
- Faking Controller As With $scope 3m
- Separating Use of $scope Methods 2m
- Capturing This With a Variable in the Controller 2m
- Adding a Watch With Controller As 2m
- Instantiating Controllers 3m
- Injecting a Route's Resolve Into a Controller 5m
- Returning a Promise From a Route Resolve 2m
- Resolve Before All Routes 3m
- Testing Controller As 2m
- Choosing a Controller Technique 2m