scaleable project structure angular js

13
5 Steps to Scalability Michael Calkins bit.ly/ngScale

Upload: michael-calkins

Post on 10-May-2015

478 views

Category:

Technology


3 download

TRANSCRIPT

Page 1: Scaleable project structure   angular js

5 Steps to Scalability

Michael Calkinsbit.ly/ngScale

Page 2: Scaleable project structure   angular js
Page 3: Scaleable project structure   angular js

1. Structure2. Modules3. Api4. Routes5. Testing

Page 4: Scaleable project structure   angular js

/app/controllers

projects.js/partials

projects-list.tpl.html/services/directives/filters

1. Structure By Type

Page 5: Scaleable project structure   angular js

1. Structure By Category

/app/projects

projects-list.tpl.htmlprojects.js/lists

/todos/dashboard/admin

/users

Page 6: Scaleable project structure   angular js

2. Beginner module mistake

directives.*services.*controllers.*filters.*

Page 7: Scaleable project structure   angular js

2. Think Modules

App

Cars Books

Users Projects

Page 8: Scaleable project structure   angular js

3. Routing - ngRoute

/projects/:projectId

Page 9: Scaleable project structure   angular js

3. Routing - ui.router

/user/:userId/car/:carId/edit

Page 10: Scaleable project structure   angular js

4. API

$http: Simple generic requests.

OR

Restangular: Resource based requests.

Page 11: Scaleable project structure   angular js

5. When to test

Prototype idea.

Does it solve the core problem?

Write e2e, automated tests and launch.

Yes

No

Page 12: Scaleable project structure   angular js

Modular and small tend to lead to less headaches.

Page 13: Scaleable project structure   angular js

Questions?

Presentation link:bit.ly/ngScale

github.com/angular-app/angular-appangular-ui.github.io

Ask me questions:@michaeljcalkins