Model Caching

InstructorBrett Cassette

Share this video with your friends

Send Tweet

Build a simple caching mechanism for your AngularJS data models.

Timothy
~ 11 years ago

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.

Brett Cassetteinstructor
~ 11 years ago

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.