Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tdumitrescu/rails-backbone-view-example
Example app demonstrating a progression from Rails+jQuery to Backbone with client-side templates
https://github.com/tdumitrescu/rails-backbone-view-example
Last synced: about 1 month ago
JSON representation
Example app demonstrating a progression from Rails+jQuery to Backbone with client-side templates
- Host: GitHub
- URL: https://github.com/tdumitrescu/rails-backbone-view-example
- Owner: tdumitrescu
- Created: 2013-12-04T18:42:23.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2013-12-05T23:05:15.000Z (about 11 years ago)
- Last Synced: 2024-10-17T21:43:53.829Z (2 months ago)
- Language: Ruby
- Size: 344 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
This is a sample Rails 4 app to accompany the blog post ["View templates in Rails with Backbone.js: Don't cross the streams!"](http://cmme.org/tdumitrescu/blog/2013/12/rails-backbone-templates/). It demonstrates a progression from Rails views with imperative jQuery-powered client code to a Backbone solution with declarative client-side templating.
Three different stages of the dynamic picture-swapping client-side app are available in branches:
- `jquery`: basic jQuery implementation of picture-cycling
- `backbone-1`: blunt Backbone version of jQuery pic-swapping
- `backbone-2`: Backbone with client-side templating## Usage
Install:
```sh
git clone [email protected]:tdumitrescu/rails-backbone-view-example.git
cd rails-backbone-view-example/
bundle install
```Run server:
```sh
bundle exec rails s
```Cycle through cute capybaras: [http://localhost:3000/](http://localhost:3000/)
Switch branches to load the different front end versions. `master` has the final Backbone implementation.