fluxo-js / fluxo

Fluxo is a simple, lightweight (~300LOC) and dependency free data infrastructure lib based on Facebook Flux and Backbone.js. It's compatible with React.js, but you can use with whatever you want to the view/component layer.
15 stars 3 forks source link

Blueprints application conflict #7

Closed samuelsimoes closed 9 years ago

samuelsimoes commented 9 years ago

How should we manage the blueprint merging conflict?

Eg.: given two blueprints with computed property that usually we don't want override, but extend.

var PersonBlueprint = {
  computed: {
    fullName: ["change"]
  }
};

var StudentBlueprint = {
  computed: {
    gradesSum: ["change:grades"]
  }
};

var john = Fluxo.ObjectStore.create({}, PersonBlueprint, StudentBlueprint);

Should we give the option to make deep merge when developer want or we'll assume that objects and arrays are or aren't deep merged?

Still on the subject we also need decide what do with functions. If we'll aggregate all conflicted functions or we override with the last value.

samuelsimoes commented 9 years ago

Closing because https://github.com/fluxo-js/fluxo/pull/10.