1 / 23

Spas with angularjs and sitecore

Spas with angularjs and sitecore. SPA Framework. Up-Front Loading Eliminate DOM Manipulation Nested Views TDD. Intro to AngularJS. Dynamic views Testability Separation of c oncerns (MVC). Templates. MVC. Model View Controller Loose coupling between UI, data and rendering rules.

psyche
Download Presentation

Spas with angularjs and sitecore

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Spas with angularjs and sitecore

  2. SPA Framework • Up-Front Loading • Eliminate DOM Manipulation • Nested Views • TDD

  3. Intro to AngularJS • Dynamic views • Testability • Separation of concerns (MVC)

  4. Templates

  5. MVC • Model • View • Controller • Loose coupling between UI, data and rendering rules

  6. Model • Angular Models are POJOs • No HTML

  7. View

  8. Controller

  9. Dependency Injection • DI in Controllers: • DI in Factory Methods

  10. Angular Directives • Angular API Directives • ng-app • ng-view • ng-click • ng-repeat • ng-model • ng-controller * Often see data-ng (valid HTML)

  11. Data Binding *source: http://docs.angularjs.org/tutorial/step_04

  12. Routes • Hashtag Routing • Routing Wire-up

  13. Three Demos • Angular Standalone • Angular + Sitecore Item Web API • Angular Integrated in Sitecore

  14. Demo #1 • Angular: Standalone App

  15. Angular SPA • Advantages • No customization required • Very light-weight • Disadvantages • Static content

  16. Demo #2 • Angular: Sitecore Item Web API

  17. Angular + Web API • Advantages • Still light-weight • Dynamic content • Disadvantages • No Sitecore layout access • Considerations • Security: Web API access • Performance: Web API calls • Cross Domain Calls

  18. Demo #3 • Angular: Sitecore Integrated

  19. Angular + Sitecore • Advantages • Dynamic content • Dynamic renderings • Disadvantages • Large dependency on SPA • Considerations • Caching • DMS & Tracking • Page Editor • Workflows (HTML validation)

  20. When to use Angular • It’s an Application, not a website • SEO is not a concern • Behind a login • Need to limit page refreshes

  21. Useful Links • Side Waffle • http://sidewaffle.com/ • John Papa • http://www.johnpapa.net/ • Year of Moo • http://www.yearofmoo.com/ • Angular Tutorial • http://docs.angularjs.org/tutorial • Angular Core NuGet • http://www.nuget.org/packages/angularjs.core • v1.2.1 is current (11/20/13)

  22. Q&A • Code: https://github.com/PetersonDave/SinglePageAppDemo • Twitter: @PetersonDave • Blog: http://petersondave.wordpress.com • ISITE Design: http://isitedesign.com • Built With Sitecore: http://www.isitedesign.com/sitecore

More Related