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

AngularJS - An Introduction for Windows Develop...

Ingo Rammer
December 05, 2013

AngularJS - An Introduction for Windows Developers (NDC London 2013)

Ingo Rammer

December 05, 2013
Tweet

More Decks by Ingo Rammer

Other Decks in Programming

Transcript

  1. That was … •  A Windows EXE (classic Windows desktop)

    •  A Mac OS .app •  A browser-based web app •  An Android App (Phone & Tablet) •  An iOS App (iPhone and iPad) •  A Windows 8 Store Application •  And a Windows Phone 8 App All with the same source code … (offline-first, code & data!)
  2. AngularJS •  http://angularjs.org/, v1.2.3 •  HTML-centric SPAs –  ("HTML enhanced

    for web apps!") •  Components made of JS + HTML •  Embeddable, DI-based, testable •  Corporate Sponsor: Google
  3. Model Binding •  Different approaches by framework –  Controller-initiated (Templating,

    jQuery, Handlebars/Mustache, ...) –  Observer pattern (Ember, Knockout, ...) –  Framework-initiated(Angular)
  4. AngularJS: Directives •  Components (HTML + JS) •  Encapsulate DOM-Manipulations

    •  Get data from $scope •  Application-specific or independent (zB angular-UI) •  Can encapsulate existing libraries
  5. AngularJS: Services •  Passed via Dependency Injection (DI) to controllers,

    directives, and other services (as constructor-parameters) •  Often use-case independent logic (otherwise: controller) •  Careful with minification (array-syntax or $inject)
  6. AngularJS •  Structure which can scale to very large JavaScript

    projects –  Controller, $scope –  DOM-Views, Model-Binding –  Directives –  Routing –  Services –  Promises •  NO DOM manipulations in your controllers! Instead: usually in directives. Sometimes in services.