1. A Real World Case Study
David Carter and Matt Tester
2. A bit of history…
• jQuery – lots of fun but things got pretty messy in the end
• Knockout – fantastic at first but still didn’t solve a lot of our issues
• Kendo UI – fell for what promised to be a great framework but really never
delivered
• Now, AngularJS and Asp.Net Web API / Node
MVC
4. Routing & View Composition
• Don’t use the default router
• Angular ui-router – state engine
• Ideally every view/state in your app should be reachable via a URL
• Nice place to put authorization in your app
• Pages can easily be composed of multiple views and controllers
• Allows you to instantiate data before view is rendered
7. Communicating with the Server
• $http – low level service for http communications
• Better - $Resource - supports action methods: get, save, query, remove,
delete
• Best – RestAngular
Great for working with a RESTful API
Returns promises – perfect for ui-router
Supports self-linking elements
Supports nested RESTful resources
8. Views & Directives
• Makes HTML readable
• Great for abstraction
• Great for use with layout frameworks, e.g. Bootstrap
• Complicated, should not be taken lightly!
10. Likes
• It covers all the bases (routing, dependency injection, MVVM, etc)
• Feels like we don’t have to roll anything ourselves
• Good code re-use with directives
• Semantic HTML
• Good community
• Good docs and resources
• Don’t have to write a lot of code
11. Dislikes
• Feels way to complicated in places (scope & directives)
• Not opinionated enough, lots of ways to do things (e.g. factory vs service)
• Steep learning curve (take that into account)
• Can tend to hide mistakes
• Can be difficult to debug
• Lack of 3rd party components
12. Should YOU use it for your next
project?
• Can you factor in plenty of time for the learning curve?
• Can you wait for Angular 2.0 to come out?