Welcome AngularJS
WIFI:
Awesense Guest
Awesense2015
Tonight Sponsored By
Enterprise Scale Angular
!(Big&Clunky)
What happens when things really start to grow?
What Works Before
Stops Working
Tests = Trusted Code
- Getting the ugly word out of the way fast
- How frustrating is it to find a bug in a library?
- The code base will become like a library
- You have to trust it
Manage Your Code Debt
(Not Angular But Should Be Mentioned)
Organize Files For Humans
Bad
Best
Better
Organize Files For Humans
- File structure and naming is for humans
- Build system modifies it for computers
-
name.type.js (dashboard.controller.js)
- Put things in the leaf nodes and bubble them up or split off into other modules as needed
Automate Things
- Gulp, Broccoli, Makefile... somethingBullet Two
- Grunt : Learn from Yeomen's grunt setup
Real Client Model
- Singleton Service
- Object on $rootScope
- js-data.io
- $scope is not your model, but your glue
Real Client Model
Use A Real Router
- ui-router is one tried and true option
- Do not mix ui state with model state, let them work together
- use $state and $model (previous point) together
Embrace Dependency Injection
Lots Of Little Parts
Much Easier To Manage And Take Care Of
DOM is Slow
JS is fast-ish
- Dealing with large chunks of data
- Manipulate the data in JS (services)
- $watch and DOM changes are expensive
- Do not preemptive optimize though
Code In The Correct Spaces
- Keep your controllers really dumb
- Put your logic in services
- Services : Business Logic
- Controller : Presentation Logic
- Directives : DOM Manupulation
Build For Experience
Enterprise Angular
By owenmead
Enterprise Angular
- 650