links for 2008-07-03
07.03.08 - 12:31am
07.01.08 - 09:34am
http://github.com/sproutit/sproutcore/wikis/sproutcore-s-modern-model-layer
http://github.com/sproutit/sproutcore/wikis/sproutcore-s-modern-model-layer-part-2
http://github.com/sproutit/sproutcore/wikis/sproutcore-s-modern-model-layer-part-3
Those links (if you haven't checked 'em out) provide some nice insight into how the SproutCore team is thinking about javascript models. It's an interesting pattern of separation.
Basically:
In a model you use MyModel.get('blah') and MyModel.set('blah') and then (it uses ruby helpers) in a view you do something like this:
where bind is telling it to update the view everytime the value 'blah' changes.
It seems like a relatively simple pattern (at least for simple updates). I'm not totally sold on SproutCore itself (and it's defacto lock-in to certain UI) but all-in-all those guys are real smart and are paving the way for real client-side javascript frameworks (not just these libraries that we have now).