Skip to content

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

License

Notifications You must be signed in to change notification settings

cronopio/backbone

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

  ____             _     _                        _     
 |  _ \           | |   | |                      (_)    
 | |_) | __ _  ___| | __| |__   ___  _ __   ___   _ ___ 
 |  _ < / _` |/ __| |/ /| '_ \ / _ \| '_ \ / _ \ | / __|
 | |_) | (_| | (__|   < | |_) | (_) | | | |  __/_| \__ \
 |____/ \__,_|\___|_|\_\|_.__/ \___/|_| |_|\___(_) |___/
                                                _/ |    
                                               |__/
(_'___________________________________________________'_)
(_.———————————————————————————————————————————————————._)
                                               
                                              
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().

About

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

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 99.6%
  • Other 0.4%