Published by Sams Publishing (October 19, 2015) © 2016
Dennis Sheppard | Christopher Miller | AJ LiptakStep-by-step instructions carefully walk you through the most common questions, issues, and tasks.
Q&A sections, quizzes, and exercises help you build and test your knowledge.
By The Way notes present interesting pieces of information.
Try it Yourself sidebars offer advice or teach an easier way to do something.
Watch Out! cautions advise you about potential problems and help you steer clear of disaster.
Dennis Sheppard is a Front-End Architect at NextTier Education in Chicago, IL. He has delivered enterprise solutions for the private equity, insurance, healthcare, education, and distribution industries. Christopher Miller is an Architect at West Monroe Partners. He has built solutions for the higher education, private equity, and renewable energy industries. AJ Liptak, is a Senior Consultant at West Monroe Partners specializing in modern web application development. He has delivered transformative solutions for the telecom, healthcare, finance, and distribution industries.
Learn how to...
- Build AngularJS web apps from scratch, or integrate with existing .NET code
- Organize, reuse, and test JavaScript web application code far more effectively
- Discover key JavaScript design patterns that support AngularJS (and their similarities to C#)
- Use AngularJS modules, controllers, views, data-binding, and event handling
- Implement AngularJS services efficiently
- Work with directives, custom directives, and dependency injection
- Set up AngularJS routing
- Apply best practices for organizing AngularJS applications
- Master sophisticated AngularJS techniques, including filters, advanced patterns, and communication between controllers
- Deploy AngularJS code to the Microsoft Azure cloud
- Unit-test and debug your single page applications
- Integrate AngularJS with .NET Web Forms and .NET MVC
- Build REST APIs in .NET and consume their services in AngularJS
- Combine AngularJS with .NET SignalR to build real-time web apps
- Extend AngularJS development with bower, gulp, and webstorm
- Preview the future of AngularJS: Version 2.0 and beyond
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
HOUR 1: Introducing Modern Front-End Development . . . . . . . . . . . . . . . . . . . . . 5
Why Does Everything Look So Different? . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
How Is the Code Different? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Options for Front-End Development . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
Why Angular? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Why Is Angular 1 Still Relevant? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Q&A . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Workshop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Exercise . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
HOUR 2: Presenting JavaScript Patterns . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Five JavaScript Tips and Tricks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
JavaScript Patterns . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
Q&A . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
Workshop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
Exercise . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
HOUR 3: Tinkering with Tools for Modern Front-End Development . . . . . . . . . . . 29
The Tool Landscape . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
Node . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
Package Management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
Q&A . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
Workshop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
Exercise . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
HOUR 4: Mastering Modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
Angular Modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
Creating Modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
Q&A . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
Workshop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
Exercise . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
HOUR 5: Covering Controlle