Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Give your JS App some Backbone with Models, Views, Collections, and Events

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 docs
Octocat-spinner-32 examples
Octocat-spinner-32 test
Octocat-spinner-32 .gitignore
Octocat-spinner-32 LICENSE
Octocat-spinner-32 README
Octocat-spinner-32 Rakefile
Octocat-spinner-32 backbone.js
Octocat-spinner-32 index.html
Octocat-spinner-32 index.js
Octocat-spinner-32 package.json
README
  ____             _     _                        _     
 |  _ \           | |   | |                      (_)    
 | |_) | __ _  ___| | __| |__   ___  _ __   ___   _ ___ 
 |  _ < / _` |/ __| |/ /| '_ \ / _ \| '_ \ / _ \ | / __|
 | |_) | (_| | (__|   < | |_) | (_) | | | |  __/_| \__ \
 |____/ \__,_|\___|_|\_\|_.__/ \___/|_| |_|\___(_) |___/
                                                _/ |    
                                               |__/
(_'___________________________________________________'_)
(_.———————————————————————————————————————————————————._)
                                               
                                              
Backbone supplies structure to JavaScript-heavy applications by providing models key-value binding and custom events, collections with a rich API of enumerable functions, views with declarative event handling, and connects it all to your existing application over a RESTful JSON interface.

For Docs, License, Tests, and pre-packed downloads, see:
http://documentcloud.github.com/backbone/

To suggest a feature, report a bug, or general discussion:
http://github.com/documentcloud/backbone/issues/

All contributors are listed here:
http://github.com/documentcloud/backbone/contributors

Special thanks to Robert Kieffer for the original philosophy behind Backbone.
http://github.com/broofa


(_'___________________________________________________'_)
(_.———————————————————————————————————————————————————._)
                                               

FORK INFO

In this fork from Backbone.js you can find a rewrite of sync() method for using with http://socket.io, emitting some events.

As you imagine using Socket.io we dont need define `url` on our models, only the model name is needed.

In the server side you can add callbacks for events with names as `model`:`action`:`type` where:

 - `model` is the name of your Backbone.Model
 - `action` can be `create`,`update`,`delete`,`read` and `index`
 - `type` can be `_response` for cases when you need send some info returning to Backbone or can be `error` reporting the action fail.
 
Well, now you image this. When the server do the action as you request, what if the server can send a message for tell other clients that some Model change and reload the changes? hum? Thats why I rewrite sync().
Something went wrong with that request. Please try again.