scaleable project structure angular js
TRANSCRIPT
5 Steps to Scalability
Michael Calkinsbit.ly/ngScale
1. Structure2. Modules3. Api4. Routes5. Testing
/app/controllers
projects.js/partials
projects-list.tpl.html/services/directives/filters
1. Structure By Type
1. Structure By Category
/app/projects
projects-list.tpl.htmlprojects.js/lists
/todos/dashboard/admin
/users
2. Beginner module mistake
directives.*services.*controllers.*filters.*
2. Think Modules
App
Cars Books
Users Projects
3. Routing - ngRoute
/projects/:projectId
3. Routing - ui.router
/user/:userId/car/:carId/edit
4. API
$http: Simple generic requests.
OR
Restangular: Resource based requests.
5. When to test
Prototype idea.
Does it solve the core problem?
Write e2e, automated tests and launch.
Yes
No
Modular and small tend to lead to less headaches.
Questions?
Presentation link:bit.ly/ngScale
github.com/angular-app/angular-appangular-ui.github.io
Ask me questions:@michaeljcalkins