Skip to content
This repository was archived by the owner on Jan 24, 2020. It is now read-only.
/ json-graph Public archive

Query JSON graph data to cleverly manage duplicate nodes. API & tests gleaned from YouTube.

License

Notifications You must be signed in to change notification settings

seanpoulter/json-graph

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Aspiring to build JSON Graph from Netflix's Falcor

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.

Inspiration and Architecture

Here's to Jafar Husain and the Netflix team for sharing their experience:

Status

Unit tests are passing for reference evaluation and Model.get():

karma start karma.conf.js

Next Up

  • 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

Omitted

  • 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( ? )

About

Query JSON graph data to cleverly manage duplicate nodes. API & tests gleaned from YouTube.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published