, backbone.js http://documentcloud.github.com/backbone/. , URL-.
, , route/# itemsList, /# items/id. , , , , , URL-. ( http://documentcloud.github.com/backbone/#Router)
var Workspace = Backbone.Router.extend({
routes: {
"help": "help",
"item/:id": "item",
"itemList": "list"
},
help: function() {
... show help
},
item: function(id) {
... show single item with jQuery, Ajax, jQuery UI etc
},
itemList: function(){
... show item list with jQuery, jQuery UI etc.
}
});
www.myapp.com/#help →
www.myapp.com/#item/32 → ID 32, item (id), Ajax
www.myapp.com/#itemList → , # / .