The ability to reply to discussions is limited to PRO members. Want to join in the discussion? Click here to subscribe now.

Model Caching

Model Caching

4:34
Build a simple caching mechanism for your AngularJS data models.
Watch this lesson now
Avatar
egghead.io

Build a simple caching mechanism for your AngularJS data models.

Avatar
Timothy

I just asked this in a tweet, but realized the comments on the video might be a better place to ask. Your ngActiveResource library looks really awesome, but I was curious why you use this over Breeze.js.

Avatar
Brett Shollenberger

Hey Tim-
In terms of just straight caching (and other things), there's no reason not to use Breeze, which is a great library. In this series we're looking at building an Angular-specific library, so you don't have to worry about the digest cycle or bindings updating when you work with them--they should just work out of the box because these are issues that we have to deal with for every Angular model. There are other semantic niceties that I like from the Rails world that we'll explore. At the end of the day, my bottom line is convention over configuration; I'm looking to expose the simplest possible API that still gives users the flexibility they need (at the end of the day, though, I'm not DHH, so we'll see how all that goes :) All this with a grain of salt; we're not going into quite the complexity of an ORM in this series, but we're looking under the hood at how some of these things are designed so we can get a sense of what these libraries are concerned with (and hopefully expose some new details you might not be familiar with.

In reply to Timothy
HEY, QUICK QUESTION!
Joel's Head
Why are we asking?