dart-archive / observe

Support for marking objects as observable, and getting notifications when those objects are mutated
https://pub.dartlang.org/packages/observe
BSD 3-Clause "New" or "Revised" License
13 stars 6 forks source link

Shouldn't @ObserveProperty and @ComputedProperty live here? #13

Open fabiosimeoni opened 9 years ago

fabiosimeoni commented 9 years ago

It'd appear that @ObserveProperty and @ComputedProperty are available only in view models, as Polymer facilities. Can you help explaining the rationale for that placement?

Both seem general facilities over lower-level PathObserver and listen() mechanisms, and as such seem well suited to live in this package.

Ok, maybe @ComputedProperty has a bit more of a model-view application slant, but not that strongly. For example, I find it very practical to avoid train-wrecks in client code, be it in templates, view models, or generic models.

Overall, the annotations seem to give fairly general OO help I regret giving up anytime I'm "below" view models. Couldn't you offer them as companions to, say, onPropertyChange()?

cheers

(and thanks for the good work!)