Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/aurbano/backbone-demo
Backbone, Mustache and Underscore demo
https://github.com/aurbano/backbone-demo
backbone demo javascript mustache underscore
Last synced: about 2 hours ago
JSON representation
Backbone, Mustache and Underscore demo
- Host: GitHub
- URL: https://github.com/aurbano/backbone-demo
- Owner: aurbano
- Created: 2013-10-15T17:32:40.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2015-09-05T12:30:13.000Z (about 9 years ago)
- Last Synced: 2024-04-15T06:46:08.082Z (7 months ago)
- Topics: backbone, demo, javascript, mustache, underscore
- Language: JavaScript
- Homepage: https://aurbano.eu/backbone-demo/
- Size: 347 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Backbone, Mustache and Underscore
===========
This demo features a commenting system based on Backbone, Mustache and Underscore. It could easily be extended to load and save comments from a real datastore or API.It was done as a requirement for a job application, the app structure and some initial coding were provided.
Demo: http://urbanoalvarez.es/backbone-demo/
###Features
* There are initially some comments that are preloaded in the HTML, the backbone collection loads these prerendered comments on initialization.
* You can add new comments using the form or generating blocks of random comments.
* Comments can be edited, reversed and deleted.
* Only one form can be open at any time.
* Uses RequireJS to manage dependencies.
* Whenever you trigger an event that would make you lose your changes there is a confirmation dialog shown.####Confirmation upon losing changes
It uses a global flag, plus an event aggregator to trigger the remove method on all open instances if necessary. The workflow is as follows:1. Check the changed flag before initializing. If true, ask for confirmation.
- User accepts, reset global flag and trigger the remove event.
- User declines, stop initialization and disallow rendering on current instance.
2. If there are changes, update the global flag.
3. If this instance is closed, either canceling or submitting, reset the flag.
4. Back to 1.###Meta
Based on https://github.com/bodnaristvan/backbone-demoAlejandro U. Álvarez - http://urbanoalvarez.es
[![Analytics](https://ga-beacon.appspot.com/UA-3181088-16/backbone-demo/readme)](https://github.com/aurbano)