Created
June 30, 2011 13:12
-
-
Save dagda1/1056202 to your computer and use it in GitHub Desktop.
observations.coffeescript
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Observation extends Backbone.Model | |
class Observations extends Backbone.Collection | |
model: Observation | |
class ObservationsView extends Backbone.View | |
el: $('#observations') | |
constructor: -> | |
@url = _observationsUrl | |
initialize: -> | |
_.bindAll @ | |
@model.bind 'change', @render | |
render: => | |
alert('rendering baby') | |
class ObservationsController extends Backbone.Controller | |
initialize: -> | |
observations = new Observations() | |
observationsView = new ObservationsView(model: observations) | |
class App | |
init: -> | |
@Views = {} | |
@Collections = {} | |
@Controllers = {} | |
@templates = Utils.loadTemplates() | |
@Controllers.Main = new ObservationsController() | |
$ -> | |
app = new App() | |
app.init() | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment