Skip to content

Instantly share code, notes, and snippets.

@jakelazaroff
jakelazaroff / backboneconf2013
Last active December 20, 2015 11:19
BackboneConf 2013 notes! http://backboneconf.com/ Disclaimer: sorry for anything I may have missed!
code delimiters: <% %>
# keynote
- your business logic will live longer than your interface
- stateless
- no "spaghetti state"
- application should be able to reflect any combination of data
- views should transparently reflect models
- backbone patterns
- custom model methods
@michaelBenin
michaelBenin / mustache.py
Created June 10, 2013 22:18
Problem: Sharing templates between backbonejs and django. I found that Backbone never needs to actually render out a whole page, only specific views, this allows me to render those views with the same templating language. If it is initial pageload, Backbone js just binds events and allows SEO and a faster page load time, as well as the page func…
from django import template
from django.conf import settings
import pystache
# Needed to register a custom template tag
register = template.Library()
# Decorator to register a tag that takes the context
@register.simple_tag(takes_context=True)
# Function which takes the django context class and the template string
@mattmccray
mattmccray / Makefile
Created October 19, 2012 04:15
Simple comparison of several compile-to-javascript languages, including: CoffeeScript, Dart, Haxe, and TypeScript.
.PHONY: compile
time=/usr/bin/time
compile: dart typescript coffeescript haxe jsx
dart:
$(time) dart2js -ooutput/dart.js source/simple.dart
typescript: