https://github.com/iroy2000/backbone-tutorial
Backbone Hands On tutorial for future class
https://github.com/iroy2000/backbone-tutorial
Last synced: 9 months ago
JSON representation
Backbone Hands On tutorial for future class
- Host: GitHub
- URL: https://github.com/iroy2000/backbone-tutorial
- Owner: iroy2000
- Created: 2013-06-27T03:15:41.000Z (almost 13 years ago)
- Default Branch: master
- Last Pushed: 2013-09-29T22:31:12.000Z (over 12 years ago)
- Last Synced: 2025-05-19T06:06:38.634Z (about 1 year ago)
- Language: JavaScript
- Size: 523 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Backbone Hands On Tutorial
--------
This project serves as the material on learning how to develop a backbone application, or understand how backbone works.
You can follow the instructions below or you can start poking around yourself.
****Disclaimer**** This project is for education purpose, please do not use this code for production use.
###Structure
The below structure is just how this project setup, doesn't have to be like this. You can setup whatever ways you like when you create your future project.
- www/template/ **--> template fragment**
- www/js/
- main.js **--> entry point**
- app/ **--> your application**
- models/ **--> your Model code**
- routers/ **--> your Router code**
- views/ **-->your view code**
###Treasure Hunt
Let's do the following task to get familiar yourself first.
- go to main.js and look at how this project is setup and how requireJS works.
- go to routers/ and add more routes and see how Backbone behaves when routes changes.
- go to models/ and create model and collection, you can look at the example and try to understand the relationship between both.
- go to views/ create a view class and how you can represents your model data into view.
###Build Tool
This build tool will minimize and optimize your static assets. You need Node install in order to run this build tool.
Just go to build-tool folder and run
>node r.js -o app.build.js
- build-tool/
- app.build.js
- r.js