substance / data

A uniform interface for domain data (deprecated)
http://code.substance.io/docs/substance-manual/
MIT License
655 stars 44 forks source link

backbone.js models and data.js graphs relation #37

Open lucalenardi opened 12 years ago

lucalenardi commented 12 years ago

Probably I'm missing something here, but I cannot understand the profound difference between a data.graph, and a backbone.model object.

Eventually, it could be useful to integrate the graphs with backbone and inherit its model features (such as bind on change etc.). Maybe it's already possibile. Isn't it?

michael commented 12 years ago

Data.js can be used as a drop-in-replacement for Backbone.Model. The combination works well so far, but there's of course room for improvements, since Backbone's event-based approach (model changes trigger view updates) can't be applied 1:1. In the long run, I'd like to have ways to bind data-nodes to DOM elements, much like in the fashion of D3.js. New nodes that just arrived, could be handled using an enter() selection then. However these are just some rough initial thoughts…

And I'm open for API suggestions :)

elf-pavlik commented 12 years ago

+1 bumping ;)

michael commented 12 years ago

I'm actually working on that right now. :)

When it's ready it will probably a mix of Backbone and D3, using the best concepts of both + Data.js as a data layer.

elf-pavlik commented 12 years ago

sounds sweeeeeeeet! thx @michael =)

d4tocchini commented 12 years ago
 D3  +  Backbone  <  Ember.js

The computed properties and bindings that Ember provides woud solve the dom-to-data binding in a much more agnostic and elegant manner.

Have you had a chance to get addicted to computed properties?