Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Angular.js and how we cook it at PandaDoc

Sponsored · Ship Features Fearlessly Turn features on and off without deploys. Used by thousands of Ruby developers.
Avatar for sbarysiuk sbarysiuk
October 30, 2013

Angular.js and how we cook it at PandaDoc

A quick overview how we cook Angular.js at PandaDoc:
- Why we have chosen it
- How we organized app structure
- Libraries we use
- Build and Deployment Process
- Etc

Avatar for sbarysiuk

sbarysiuk

October 30, 2013
Tweet

More Decks by sbarysiuk

Other Decks in Programming

Transcript

  1. What do I need to know to launch an app

    with a new technology? Wednesday, October 30, 13
  2. • Samples • Folders structure, organizing code • External libs

    to start quicker • Development process • Testing • Dependency management • Packing project • Deployment • What to do if I fail.... What do I need to start? Wednesday, October 30, 13
  3. Sample apps are too simple... • Find good open-source apps

    at GitHub & BitBucket • Check their authors and their blogs, you’ll find great stuff there • E.g. https://github.com/IgorMinar/foodme Wednesday, October 30, 13
  4. Folders and code structure • Easy if you have just

    a few pages • Hard if app is growing and you need to maintain everything Wednesday, October 30, 13
  5. Folders and code structure • We have started with Yeoman

    • We use https://github.com/yeoman/ generator-angular • Dividing app into Business Logic parts + separate independent service/utility modules Wednesday, October 30, 13
  6. Naming conventions • One Controller/Directive/Service/Provider per file • File name

    == Class name • Initialization code -> package_name.js Wednesday, October 30, 13
  7. Batteries included... • Frequent commits on GitHub/BitBucket • Available via

    Bower • Clone if we need to change something Wednesday, October 30, 13
  8. angular-ui-router • Organizing application as a state machine not around

    URLs • Nested states and state inheritance • Named views Wednesday, October 30, 13
  9. restangular • Restangular is an AngularJS service that simplifies common

    GET, DELETE, and UPDATE requests with a minimum of client code. • More flexible than $resource Wednesday, October 30, 13
  10. Testing • Unit testing • E2E testing • Karma-runner +

    grunt-karma Wednesday, October 30, 13
  11. Cool, but what if I fail and it doesn’t work

    for me... Wednesday, October 30, 13