4 ms·
An Intro to Backbone.js: Part 1 - Models and Collections
- Qz 16y agoI'd like to check this out, but the code examples aren't nearly dark enough (on FF4.0b9 at least) which makes them painful to read.
- icey 16y agoThe readability bookmarklet works on code examples too: http://lab.arc90.com/experiments/readability/ http://lab.arc90.com/experiments/readability/
- davej 16y agoPaste this into the Firebug/Webkit console: jQuery("code").css({"background-color":"#333", "color":"#fff"});
- n_time 16y agoSorry about that. My company is waiting on a new site design and this WP template is what we're using for now. I switched up the code styling a little. Should be easier on the eyes now.
- Qz 16y agoDefinitely more readable, thanks. The horizontal scrollbars in that version are somewhat annoying, but nothing's perfect.
- dinedal 16y agoBackbone.js is really cool sounding, but is there a really easy way to add persistence? (CouchDB/MongoDB/something else?)
- davej 16y agoYes, backbone-couchdb.js Annotated source: http://janmonschke.github.com/backbone-couchdb/backbone-couchdb.html http://janmonschke.github.com/backbone-couchdb/backbone-couc... Article: http://janmonschke.posterous.com/backbone-couchdb-give-your-couchapp-some-back http://janmonschke.posterous.com/backbone-couchdb-give-your-...
- clyfe 16y agoIt's meant to "bake your own" like so: * expose your data via REST * configure your models tot the urls where to sync data /users , /posts/1 etc.
- jashkenas 16y agoYes ... we persist to PostgreSQL/Solr, but others using Backbone sync their models to MySQL, CouchDB, MongoDB, and Redis (that I've heard of).
- steveklabnik 16y agoCheck out http://documentcloud.github.com/backbone/#Model-url http://documentcloud.github.com/backbone/#Model-url and http://documentcloud.github.com/backbone/#Sync http://documentcloud.github.com/backbone/#Sync There's even a local storage adapter: http://documentcloud.github.com/backbone/docs/backbone-localstorage.html http://documentcloud.github.com/backbone/docs/backbone-local...
- bergie 16y agoI switched Midgard Create, our CMS UI to use it instead of our custom persistence system. Cleaned the code a lot, and opened quite a few new possibilities. Here is the client end: https://github.com/bergie/midgardmvc_ui_create/blob/master/static/js/objectmanager.js https://github.com/bergie/midgardmvc_ui_create/blob/master/s... And the server end: https://github.com/bergie/midgardmvc_ui_create/blob/master/controllers/backbone.php https://github.com/bergie/midgardmvc_ui_create/blob/master/c... ...and the concept explained: http://bergie.iki.fi/blog/using_rdfa_to_make_a_web_page_editable/ http://bergie.iki.fi/blog/using_rdfa_to_make_a_web_page_edit...