Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/philschatz/backbone-socket-change
Fire Backbone events through the webserver to other clients listening to the same models using socket.io
https://github.com/philschatz/backbone-socket-change
Last synced: about 2 months ago
JSON representation
Fire Backbone events through the webserver to other clients listening to the same models using socket.io
- Host: GitHub
- URL: https://github.com/philschatz/backbone-socket-change
- Owner: philschatz
- Created: 2013-04-01T03:43:32.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2013-04-01T03:45:57.000Z (almost 12 years ago)
- Last Synced: 2024-10-13T16:43:40.136Z (3 months ago)
- Language: JavaScript
- Homepage:
- Size: 203 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# What is this?
This example shows how to synchronize Backbone Models on the client browser with Backbone Models on a nodejs webserver.
This means a `model.set('hello', 'world')` in the browser will cause a `model.set(...)` on the server and a `model.set(...)` on each client listening to the same model.
When a `model.sync({success: ...})` is called on the browser, the `sync` method is instead called on the server but when the `sync` completes on the server the `success/error` callbacks on the browser model are called.