As the team at Netflix UI Engineering work to bring Falcor to the open source community, this is an effort to implement JSON Graph with a similar API as the public demonstrations while learning to use Karma and Jasmine.
Here's to Jafar Husain and the Netflix team for sharing their experience:
- JSON Graph: Reactive REST at Netflix -- 2015-02-26 @ Applicative
- Netflix JavaScript Talks - Falcor -- 2015-04-16 @ Netflix
Unit tests are passing for reference evaluation and Model.get():
karma start karma.conf.js
- Return a promise from Model.get/getValue (.then() syntax)
- Looks like Model.getValue(query) returns just a single value
- ... and Model.get(query) returns the json: { ... } formatted data
- Clean up string tokenizing with a quick regex to the next . or [
- Setting the cache with an array in JSON arg maps to an associative array
- Model.set
JavaScript model.setValue('genreLists[0].titles[0].rating', 17).then(function () { return model.get('genreLists[0..1].titles[0]["name","rating"]'); }).then(log);
- Play with Observables
- Server
- RoutedSever
- Building query strings to GET
- Building optimized query strings for ID optimization, for example:
model.getValue('genreLists[0].titles[0].boxShot').then(log); -> GET [["titlesById",956,boxShot]]
- Creating a new asynchronous view (t=45m)
member.bind('location ? then(locationModel ? new LocationView( ? )