![Page 1: The CoffeeScript Edge - Chariot Solutionschariotsolutions.com/wp-content/uploads/presentations/archive/627/… · The CoffeeScript Edge Presented by Trevor Burnham at Philly ETE 2012](https://reader034.vdocument.in/reader034/viewer/2022051511/60048fb2c8d4ab6f9b4a65d7/html5/thumbnails/1.jpg)
The CoffeeScript Edge
Presented by Trevor Burnham at Philly ETE 2012
Wednesday, April 11, 12
![Page 2: The CoffeeScript Edge - Chariot Solutionschariotsolutions.com/wp-content/uploads/presentations/archive/627/… · The CoffeeScript Edge Presented by Trevor Burnham at Philly ETE 2012](https://reader034.vdocument.in/reader034/viewer/2022051511/60048fb2c8d4ab6f9b4a65d7/html5/thumbnails/2.jpg)
Who Am I?
Wednesday, April 11, 12
![Page 3: The CoffeeScript Edge - Chariot Solutionschariotsolutions.com/wp-content/uploads/presentations/archive/627/… · The CoffeeScript Edge Presented by Trevor Burnham at Philly ETE 2012](https://reader034.vdocument.in/reader034/viewer/2022051511/60048fb2c8d4ab6f9b4a65d7/html5/thumbnails/3.jpg)
http://pragprog.com/book/tbcoffee/coffeescriptWednesday, April 11, 12
![Page 4: The CoffeeScript Edge - Chariot Solutionschariotsolutions.com/wp-content/uploads/presentations/archive/627/… · The CoffeeScript Edge Presented by Trevor Burnham at Philly ETE 2012](https://reader034.vdocument.in/reader034/viewer/2022051511/60048fb2c8d4ab6f9b4a65d7/html5/thumbnails/4.jpg)
http://pragprog.com/book/tbcoffee/coffeescript
“This book helps readers become better JavaScripters in the process of learning CoffeeScript. What’s more, this book is a blast to read.”—Brendan Eich
Wednesday, April 11, 12
![Page 5: The CoffeeScript Edge - Chariot Solutionschariotsolutions.com/wp-content/uploads/presentations/archive/627/… · The CoffeeScript Edge Presented by Trevor Burnham at Philly ETE 2012](https://reader034.vdocument.in/reader034/viewer/2022051511/60048fb2c8d4ab6f9b4a65d7/html5/thumbnails/5.jpg)
The Compleat History of JavaScript
Preface
Wednesday, April 11, 12
![Page 6: The CoffeeScript Edge - Chariot Solutionschariotsolutions.com/wp-content/uploads/presentations/archive/627/… · The CoffeeScript Edge Presented by Trevor Burnham at Philly ETE 2012](https://reader034.vdocument.in/reader034/viewer/2022051511/60048fb2c8d4ab6f9b4a65d7/html5/thumbnails/6.jpg)
1995 to 2003: Ancient JavaScript
Wednesday, April 11, 12
![Page 7: The CoffeeScript Edge - Chariot Solutionschariotsolutions.com/wp-content/uploads/presentations/archive/627/… · The CoffeeScript Edge Presented by Trevor Burnham at Philly ETE 2012](https://reader034.vdocument.in/reader034/viewer/2022051511/60048fb2c8d4ab6f9b4a65d7/html5/thumbnails/7.jpg)
Paul Graham on JavaScript:
Wednesday, April 11, 12
![Page 8: The CoffeeScript Edge - Chariot Solutionschariotsolutions.com/wp-content/uploads/presentations/archive/627/… · The CoffeeScript Edge Presented by Trevor Burnham at Philly ETE 2012](https://reader034.vdocument.in/reader034/viewer/2022051511/60048fb2c8d4ab6f9b4a65d7/html5/thumbnails/8.jpg)
Paul Graham on JavaScript:
“I would not even use Javascript, if I were you... Most of the JavaScript I see on the Web isn’t necessary, and much of it breaks.”
(“The Other Road Ahead,” 2001)
Wednesday, April 11, 12
![Page 9: The CoffeeScript Edge - Chariot Solutionschariotsolutions.com/wp-content/uploads/presentations/archive/627/… · The CoffeeScript Edge Presented by Trevor Burnham at Philly ETE 2012](https://reader034.vdocument.in/reader034/viewer/2022051511/60048fb2c8d4ab6f9b4a65d7/html5/thumbnails/9.jpg)
2004-2008: Medieval JavaScript
Wednesday, April 11, 12
![Page 10: The CoffeeScript Edge - Chariot Solutionschariotsolutions.com/wp-content/uploads/presentations/archive/627/… · The CoffeeScript Edge Presented by Trevor Burnham at Philly ETE 2012](https://reader034.vdocument.in/reader034/viewer/2022051511/60048fb2c8d4ab6f9b4a65d7/html5/thumbnails/10.jpg)
Ajax!
Wednesday, April 11, 12
![Page 11: The CoffeeScript Edge - Chariot Solutionschariotsolutions.com/wp-content/uploads/presentations/archive/627/… · The CoffeeScript Edge Presented by Trevor Burnham at Philly ETE 2012](https://reader034.vdocument.in/reader034/viewer/2022051511/60048fb2c8d4ab6f9b4a65d7/html5/thumbnails/11.jpg)
Crockford!
Wednesday, April 11, 12
![Page 12: The CoffeeScript Edge - Chariot Solutionschariotsolutions.com/wp-content/uploads/presentations/archive/627/… · The CoffeeScript Edge Presented by Trevor Burnham at Philly ETE 2012](https://reader034.vdocument.in/reader034/viewer/2022051511/60048fb2c8d4ab6f9b4a65d7/html5/thumbnails/12.jpg)
Solid libraries!
Wednesday, April 11, 12
![Page 13: The CoffeeScript Edge - Chariot Solutionschariotsolutions.com/wp-content/uploads/presentations/archive/627/… · The CoffeeScript Edge Presented by Trevor Burnham at Philly ETE 2012](https://reader034.vdocument.in/reader034/viewer/2022051511/60048fb2c8d4ab6f9b4a65d7/html5/thumbnails/13.jpg)
Solid libraries!
...And probably others!
Wednesday, April 11, 12
![Page 14: The CoffeeScript Edge - Chariot Solutionschariotsolutions.com/wp-content/uploads/presentations/archive/627/… · The CoffeeScript Edge Presented by Trevor Burnham at Philly ETE 2012](https://reader034.vdocument.in/reader034/viewer/2022051511/60048fb2c8d4ab6f9b4a65d7/html5/thumbnails/14.jpg)
2009-: Modern JavaScript
Wednesday, April 11, 12
![Page 15: The CoffeeScript Edge - Chariot Solutionschariotsolutions.com/wp-content/uploads/presentations/archive/627/… · The CoffeeScript Edge Presented by Trevor Burnham at Philly ETE 2012](https://reader034.vdocument.in/reader034/viewer/2022051511/60048fb2c8d4ab6f9b4a65d7/html5/thumbnails/15.jpg)
JavaScript on the Server
Wednesday, April 11, 12
![Page 16: The CoffeeScript Edge - Chariot Solutionschariotsolutions.com/wp-content/uploads/presentations/archive/627/… · The CoffeeScript Edge Presented by Trevor Burnham at Philly ETE 2012](https://reader034.vdocument.in/reader034/viewer/2022051511/60048fb2c8d4ab6f9b4a65d7/html5/thumbnails/16.jpg)
JavaScript as anEmbedded Scripting Language
Wednesday, April 11, 12
![Page 17: The CoffeeScript Edge - Chariot Solutionschariotsolutions.com/wp-content/uploads/presentations/archive/627/… · The CoffeeScript Edge Presented by Trevor Burnham at Philly ETE 2012](https://reader034.vdocument.in/reader034/viewer/2022051511/60048fb2c8d4ab6f9b4a65d7/html5/thumbnails/17.jpg)
JavaScript is Now FAST!
Wednesday, April 11, 12
![Page 18: The CoffeeScript Edge - Chariot Solutionschariotsolutions.com/wp-content/uploads/presentations/archive/627/… · The CoffeeScript Edge Presented by Trevor Burnham at Philly ETE 2012](https://reader034.vdocument.in/reader034/viewer/2022051511/60048fb2c8d4ab6f9b4a65d7/html5/thumbnails/18.jpg)
The New First Language?
http://www.codecademy.com/
Wednesday, April 11, 12
![Page 19: The CoffeeScript Edge - Chariot Solutionschariotsolutions.com/wp-content/uploads/presentations/archive/627/… · The CoffeeScript Edge Presented by Trevor Burnham at Philly ETE 2012](https://reader034.vdocument.in/reader034/viewer/2022051511/60048fb2c8d4ab6f9b4a65d7/html5/thumbnails/19.jpg)
Everyone Who Knows JavaScriptFeels Like Superman!
Wednesday, April 11, 12
![Page 20: The CoffeeScript Edge - Chariot Solutionschariotsolutions.com/wp-content/uploads/presentations/archive/627/… · The CoffeeScript Edge Presented by Trevor Burnham at Philly ETE 2012](https://reader034.vdocument.in/reader034/viewer/2022051511/60048fb2c8d4ab6f9b4a65d7/html5/thumbnails/20.jpg)
Wednesday, April 11, 12
![Page 21: The CoffeeScript Edge - Chariot Solutionschariotsolutions.com/wp-content/uploads/presentations/archive/627/… · The CoffeeScript Edge Presented by Trevor Burnham at Philly ETE 2012](https://reader034.vdocument.in/reader034/viewer/2022051511/60048fb2c8d4ab6f9b4a65d7/html5/thumbnails/21.jpg)
“A Little Language”
Wednesday, April 11, 12
![Page 22: The CoffeeScript Edge - Chariot Solutionschariotsolutions.com/wp-content/uploads/presentations/archive/627/… · The CoffeeScript Edge Presented by Trevor Burnham at Philly ETE 2012](https://reader034.vdocument.in/reader034/viewer/2022051511/60048fb2c8d4ab6f9b4a65d7/html5/thumbnails/22.jpg)
Timeline
Wednesday, April 11, 12
![Page 23: The CoffeeScript Edge - Chariot Solutionschariotsolutions.com/wp-content/uploads/presentations/archive/627/… · The CoffeeScript Edge Presented by Trevor Burnham at Philly ETE 2012](https://reader034.vdocument.in/reader034/viewer/2022051511/60048fb2c8d4ab6f9b4a65d7/html5/thumbnails/23.jpg)
Timeline
Christmas 2009: First announced on HN
Wednesday, April 11, 12
![Page 24: The CoffeeScript Edge - Chariot Solutionschariotsolutions.com/wp-content/uploads/presentations/archive/627/… · The CoffeeScript Edge Presented by Trevor Burnham at Philly ETE 2012](https://reader034.vdocument.in/reader034/viewer/2022051511/60048fb2c8d4ab6f9b4a65d7/html5/thumbnails/24.jpg)
Timeline
Christmas 2009: First announced on HN
Christmas 2010: 1.0 Released
Wednesday, April 11, 12
![Page 25: The CoffeeScript Edge - Chariot Solutionschariotsolutions.com/wp-content/uploads/presentations/archive/627/… · The CoffeeScript Edge Presented by Trevor Burnham at Philly ETE 2012](https://reader034.vdocument.in/reader034/viewer/2022051511/60048fb2c8d4ab6f9b4a65d7/html5/thumbnails/25.jpg)
Timeline
Christmas 2009: First announced on HN
Christmas 2010: 1.0 Released
April 13, 2011: Added to Ruby on Rails
Wednesday, April 11, 12
![Page 26: The CoffeeScript Edge - Chariot Solutionschariotsolutions.com/wp-content/uploads/presentations/archive/627/… · The CoffeeScript Edge Presented by Trevor Burnham at Philly ETE 2012](https://reader034.vdocument.in/reader034/viewer/2022051511/60048fb2c8d4ab6f9b4a65d7/html5/thumbnails/26.jpg)
https://github.com/rails/rails/commit/9f09aeb8273177fc2d09ebdafcc76ee8eb56fe33
Wednesday, April 11, 12
![Page 27: The CoffeeScript Edge - Chariot Solutionschariotsolutions.com/wp-content/uploads/presentations/archive/627/… · The CoffeeScript Edge Presented by Trevor Burnham at Philly ETE 2012](https://reader034.vdocument.in/reader034/viewer/2022051511/60048fb2c8d4ab6f9b4a65d7/html5/thumbnails/27.jpg)
David Heinemeier Hansson
Wednesday, April 11, 12
![Page 28: The CoffeeScript Edge - Chariot Solutionschariotsolutions.com/wp-content/uploads/presentations/archive/627/… · The CoffeeScript Edge Presented by Trevor Burnham at Philly ETE 2012](https://reader034.vdocument.in/reader034/viewer/2022051511/60048fb2c8d4ab6f9b4a65d7/html5/thumbnails/28.jpg)
Ward Cunningham
Wednesday, April 11, 12
![Page 29: The CoffeeScript Edge - Chariot Solutionschariotsolutions.com/wp-content/uploads/presentations/archive/627/… · The CoffeeScript Edge Presented by Trevor Burnham at Philly ETE 2012](https://reader034.vdocument.in/reader034/viewer/2022051511/60048fb2c8d4ab6f9b4a65d7/html5/thumbnails/29.jpg)
Ward Cunningham
“CoffeeScript and the environment will all the powerful browsers is the closest I felt to the power I had twenty years ago in Smalltalk.”
—Interview with InfoQ, November 2011
Wednesday, April 11, 12
![Page 30: The CoffeeScript Edge - Chariot Solutionschariotsolutions.com/wp-content/uploads/presentations/archive/627/… · The CoffeeScript Edge Presented by Trevor Burnham at Philly ETE 2012](https://reader034.vdocument.in/reader034/viewer/2022051511/60048fb2c8d4ab6f9b4a65d7/html5/thumbnails/30.jpg)
Brendan Eich (!)
Wednesday, April 11, 12
![Page 31: The CoffeeScript Edge - Chariot Solutionschariotsolutions.com/wp-content/uploads/presentations/archive/627/… · The CoffeeScript Edge Presented by Trevor Burnham at Philly ETE 2012](https://reader034.vdocument.in/reader034/viewer/2022051511/60048fb2c8d4ab6f9b4a65d7/html5/thumbnails/31.jpg)
Brendan Eich (!)
CoffeeScript user
Wednesday, April 11, 12
![Page 32: The CoffeeScript Edge - Chariot Solutionschariotsolutions.com/wp-content/uploads/presentations/archive/627/… · The CoffeeScript Edge Presented by Trevor Burnham at Philly ETE 2012](https://reader034.vdocument.in/reader034/viewer/2022051511/60048fb2c8d4ab6f9b4a65d7/html5/thumbnails/32.jpg)
Eich + Ashkenas at JsConf 2011
Wednesday, April 11, 12
![Page 33: The CoffeeScript Edge - Chariot Solutionschariotsolutions.com/wp-content/uploads/presentations/archive/627/… · The CoffeeScript Edge Presented by Trevor Burnham at Philly ETE 2012](https://reader034.vdocument.in/reader034/viewer/2022051511/60048fb2c8d4ab6f9b4a65d7/html5/thumbnails/33.jpg)
Who uses it?
https://github.com/jashkenas/coffee-script/wiki/In-The-Wild
Wednesday, April 11, 12
![Page 34: The CoffeeScript Edge - Chariot Solutionschariotsolutions.com/wp-content/uploads/presentations/archive/627/… · The CoffeeScript Edge Presented by Trevor Burnham at Philly ETE 2012](https://reader034.vdocument.in/reader034/viewer/2022051511/60048fb2c8d4ab6f9b4a65d7/html5/thumbnails/34.jpg)
Ponder This...
https://github.com/languages/CoffeeScript
Wednesday, April 11, 12
![Page 35: The CoffeeScript Edge - Chariot Solutionschariotsolutions.com/wp-content/uploads/presentations/archive/627/… · The CoffeeScript Edge Presented by Trevor Burnham at Philly ETE 2012](https://reader034.vdocument.in/reader034/viewer/2022051511/60048fb2c8d4ab6f9b4a65d7/html5/thumbnails/35.jpg)
CoffeeScript: A Bird’s-Eye View
I
Wednesday, April 11, 12
![Page 36: The CoffeeScript Edge - Chariot Solutionschariotsolutions.com/wp-content/uploads/presentations/archive/627/… · The CoffeeScript Edge Presented by Trevor Burnham at Philly ETE 2012](https://reader034.vdocument.in/reader034/viewer/2022051511/60048fb2c8d4ab6f9b4a65d7/html5/thumbnails/36.jpg)
Things CoffeeScript Isn’t:
Wednesday, April 11, 12
![Page 37: The CoffeeScript Edge - Chariot Solutionschariotsolutions.com/wp-content/uploads/presentations/archive/627/… · The CoffeeScript Edge Presented by Trevor Burnham at Philly ETE 2012](https://reader034.vdocument.in/reader034/viewer/2022051511/60048fb2c8d4ab6f9b4a65d7/html5/thumbnails/37.jpg)
Things CoffeeScript Isn’t:
Ruby/Python
Wednesday, April 11, 12
![Page 38: The CoffeeScript Edge - Chariot Solutionschariotsolutions.com/wp-content/uploads/presentations/archive/627/… · The CoffeeScript Edge Presented by Trevor Burnham at Philly ETE 2012](https://reader034.vdocument.in/reader034/viewer/2022051511/60048fb2c8d4ab6f9b4a65d7/html5/thumbnails/38.jpg)
Things CoffeeScript Isn’t:
Ruby/Python
jQuery
Wednesday, April 11, 12
![Page 39: The CoffeeScript Edge - Chariot Solutionschariotsolutions.com/wp-content/uploads/presentations/archive/627/… · The CoffeeScript Edge Presented by Trevor Burnham at Philly ETE 2012](https://reader034.vdocument.in/reader034/viewer/2022051511/60048fb2c8d4ab6f9b4a65d7/html5/thumbnails/39.jpg)
Things CoffeeScript Isn’t:
Ruby/Python
jQuery
GWT
Wednesday, April 11, 12
![Page 40: The CoffeeScript Edge - Chariot Solutionschariotsolutions.com/wp-content/uploads/presentations/archive/627/… · The CoffeeScript Edge Presented by Trevor Burnham at Philly ETE 2012](https://reader034.vdocument.in/reader034/viewer/2022051511/60048fb2c8d4ab6f9b4a65d7/html5/thumbnails/40.jpg)
Things CoffeeScript Isn’t:
Ruby/Python
jQuery
GWT
Dart
Wednesday, April 11, 12
![Page 41: The CoffeeScript Edge - Chariot Solutionschariotsolutions.com/wp-content/uploads/presentations/archive/627/… · The CoffeeScript Edge Presented by Trevor Burnham at Philly ETE 2012](https://reader034.vdocument.in/reader034/viewer/2022051511/60048fb2c8d4ab6f9b4a65d7/html5/thumbnails/41.jpg)
Things CoffeeScript Isn’t:
Ruby/Python
jQuery
GWT
Dart
alert 'Hello World!' # 1 line!!!
Wednesday, April 11, 12
![Page 42: The CoffeeScript Edge - Chariot Solutionschariotsolutions.com/wp-content/uploads/presentations/archive/627/… · The CoffeeScript Edge Presented by Trevor Burnham at Philly ETE 2012](https://reader034.vdocument.in/reader034/viewer/2022051511/60048fb2c8d4ab6f9b4a65d7/html5/thumbnails/42.jpg)
“It’s Just JavaScript”
Wednesday, April 11, 12
![Page 43: The CoffeeScript Edge - Chariot Solutionschariotsolutions.com/wp-content/uploads/presentations/archive/627/… · The CoffeeScript Edge Presented by Trevor Burnham at Philly ETE 2012](https://reader034.vdocument.in/reader034/viewer/2022051511/60048fb2c8d4ab6f9b4a65d7/html5/thumbnails/43.jpg)
“It’s Just JavaScript”
a = b # var a = b;
Wednesday, April 11, 12
![Page 44: The CoffeeScript Edge - Chariot Solutionschariotsolutions.com/wp-content/uploads/presentations/archive/627/… · The CoffeeScript Edge Presented by Trevor Burnham at Philly ETE 2012](https://reader034.vdocument.in/reader034/viewer/2022051511/60048fb2c8d4ab6f9b4a65d7/html5/thumbnails/44.jpg)
“It’s Just JavaScript”
a = b # var a = b;
x is y # x === y;
Wednesday, April 11, 12
![Page 45: The CoffeeScript Edge - Chariot Solutionschariotsolutions.com/wp-content/uploads/presentations/archive/627/… · The CoffeeScript Edge Presented by Trevor Burnham at Philly ETE 2012](https://reader034.vdocument.in/reader034/viewer/2022051511/60048fb2c8d4ab6f9b4a65d7/html5/thumbnails/45.jpg)
“It’s Just JavaScript”
a = b # var a = b;
x is y # x === y;
f arg # f(arg);
Wednesday, April 11, 12
![Page 46: The CoffeeScript Edge - Chariot Solutionschariotsolutions.com/wp-content/uploads/presentations/archive/627/… · The CoffeeScript Edge Presented by Trevor Burnham at Philly ETE 2012](https://reader034.vdocument.in/reader034/viewer/2022051511/60048fb2c8d4ab6f9b4a65d7/html5/thumbnails/46.jpg)
“It’s Just JavaScript”
a = b # var a = b;
x is y # x === y;
f arg # f(arg);
f = -‐> x# var f = function() {return x;};
Wednesday, April 11, 12
![Page 47: The CoffeeScript Edge - Chariot Solutionschariotsolutions.com/wp-content/uploads/presentations/archive/627/… · The CoffeeScript Edge Presented by Trevor Burnham at Philly ETE 2012](https://reader034.vdocument.in/reader034/viewer/2022051511/60048fb2c8d4ab6f9b4a65d7/html5/thumbnails/47.jpg)
“It’s Just JavaScript”
a = b # var a = b;
x is y # x === y;
f arg # f(arg);
f = -‐> x# var f = function() {return x;};
No standard library. No additional types.Nothing but sweet, sweet syntax!
Wednesday, April 11, 12
![Page 48: The CoffeeScript Edge - Chariot Solutionschariotsolutions.com/wp-content/uploads/presentations/archive/627/… · The CoffeeScript Edge Presented by Trevor Burnham at Philly ETE 2012](https://reader034.vdocument.in/reader034/viewer/2022051511/60048fb2c8d4ab6f9b4a65d7/html5/thumbnails/48.jpg)
Ruby-isms
Wednesday, April 11, 12
![Page 49: The CoffeeScript Edge - Chariot Solutionschariotsolutions.com/wp-content/uploads/presentations/archive/627/… · The CoffeeScript Edge Presented by Trevor Burnham at Philly ETE 2012](https://reader034.vdocument.in/reader034/viewer/2022051511/60048fb2c8d4ab6f9b4a65d7/html5/thumbnails/49.jpg)
Ruby-isms
"That costs $#{price}"# "That costs $" + price
Wednesday, April 11, 12
![Page 50: The CoffeeScript Edge - Chariot Solutionschariotsolutions.com/wp-content/uploads/presentations/archive/627/… · The CoffeeScript Edge Presented by Trevor Burnham at Philly ETE 2012](https://reader034.vdocument.in/reader034/viewer/2022051511/60048fb2c8d4ab6f9b4a65d7/html5/thumbnails/50.jpg)
Streamlined Literals (I)
Wednesday, April 11, 12
![Page 51: The CoffeeScript Edge - Chariot Solutionschariotsolutions.com/wp-content/uploads/presentations/archive/627/… · The CoffeeScript Edge Presented by Trevor Burnham at Philly ETE 2012](https://reader034.vdocument.in/reader034/viewer/2022051511/60048fb2c8d4ab6f9b4a65d7/html5/thumbnails/51.jpg)
Streamlined Literals (I)
[ "Commas?" "We" "don't" "need" "no" "stinking" "commmas!"]
Wednesday, April 11, 12
![Page 52: The CoffeeScript Edge - Chariot Solutionschariotsolutions.com/wp-content/uploads/presentations/archive/627/… · The CoffeeScript Edge Presented by Trevor Burnham at Philly ETE 2012](https://reader034.vdocument.in/reader034/viewer/2022051511/60048fb2c8d4ab6f9b4a65d7/html5/thumbnails/52.jpg)
Streamlined Literals (II)
Wednesday, April 11, 12
![Page 53: The CoffeeScript Edge - Chariot Solutionschariotsolutions.com/wp-content/uploads/presentations/archive/627/… · The CoffeeScript Edge Presented by Trevor Burnham at Philly ETE 2012](https://reader034.vdocument.in/reader034/viewer/2022051511/60048fb2c8d4ab6f9b4a65d7/html5/thumbnails/53.jpg)
Streamlined Literals (II)
outer: inner: "You got YAML in my JSON!"
{outer: {inner: "You got YAML in my JSON!" }}
Wednesday, April 11, 12
![Page 54: The CoffeeScript Edge - Chariot Solutionschariotsolutions.com/wp-content/uploads/presentations/archive/627/… · The CoffeeScript Edge Presented by Trevor Burnham at Philly ETE 2012](https://reader034.vdocument.in/reader034/viewer/2022051511/60048fb2c8d4ab6f9b4a65d7/html5/thumbnails/54.jpg)
{key: key} Shorthand andDestructuring Assignment
Wednesday, April 11, 12
![Page 55: The CoffeeScript Edge - Chariot Solutionschariotsolutions.com/wp-content/uploads/presentations/archive/627/… · The CoffeeScript Edge Presented by Trevor Burnham at Philly ETE 2012](https://reader034.vdocument.in/reader034/viewer/2022051511/60048fb2c8d4ab6f9b4a65d7/html5/thumbnails/55.jpg)
{key: key} Shorthand andDestructuring Assignment
obj = {x} # obj = {x: x};
Wednesday, April 11, 12
![Page 56: The CoffeeScript Edge - Chariot Solutionschariotsolutions.com/wp-content/uploads/presentations/archive/627/… · The CoffeeScript Edge Presented by Trevor Burnham at Philly ETE 2012](https://reader034.vdocument.in/reader034/viewer/2022051511/60048fb2c8d4ab6f9b4a65d7/html5/thumbnails/56.jpg)
{key: key} Shorthand andDestructuring Assignment
obj = {x} # obj = {x: x};
{x} = obj # x = obj.x;
Wednesday, April 11, 12
![Page 57: The CoffeeScript Edge - Chariot Solutionschariotsolutions.com/wp-content/uploads/presentations/archive/627/… · The CoffeeScript Edge Presented by Trevor Burnham at Philly ETE 2012](https://reader034.vdocument.in/reader034/viewer/2022051511/60048fb2c8d4ab6f9b4a65d7/html5/thumbnails/57.jpg)
{key: key} Shorthand andDestructuring Assignment
obj = {x} # obj = {x: x};
{x} = obj # x = obj.x;
func = ({x}) -‐>func = function(o) { var x = o.x;}
Wednesday, April 11, 12
![Page 58: The CoffeeScript Edge - Chariot Solutionschariotsolutions.com/wp-content/uploads/presentations/archive/627/… · The CoffeeScript Edge Presented by Trevor Burnham at Philly ETE 2012](https://reader034.vdocument.in/reader034/viewer/2022051511/60048fb2c8d4ab6f9b4a65d7/html5/thumbnails/58.jpg)
More Syntactic Sugar
Wednesday, April 11, 12
![Page 59: The CoffeeScript Edge - Chariot Solutionschariotsolutions.com/wp-content/uploads/presentations/archive/627/… · The CoffeeScript Edge Presented by Trevor Burnham at Philly ETE 2012](https://reader034.vdocument.in/reader034/viewer/2022051511/60048fb2c8d4ab6f9b4a65d7/html5/thumbnails/59.jpg)
More Syntactic Sugar
f() if z # if (z) { f(); }
Wednesday, April 11, 12
![Page 60: The CoffeeScript Edge - Chariot Solutionschariotsolutions.com/wp-content/uploads/presentations/archive/627/… · The CoffeeScript Edge Presented by Trevor Burnham at Philly ETE 2012](https://reader034.vdocument.in/reader034/viewer/2022051511/60048fb2c8d4ab6f9b4a65d7/html5/thumbnails/60.jpg)
More Syntactic Sugar
f() if z # if (z) { f(); }
f?() # if (...) { f(); }
Wednesday, April 11, 12
![Page 61: The CoffeeScript Edge - Chariot Solutionschariotsolutions.com/wp-content/uploads/presentations/archive/627/… · The CoffeeScript Edge Presented by Trevor Burnham at Philly ETE 2012](https://reader034.vdocument.in/reader034/viewer/2022051511/60048fb2c8d4ab6f9b4a65d7/html5/thumbnails/61.jpg)
More Syntactic Sugar
f() if z # if (z) { f(); }
f?() # if (...) { f(); }
obj? # obj != null;
Wednesday, April 11, 12
![Page 62: The CoffeeScript Edge - Chariot Solutionschariotsolutions.com/wp-content/uploads/presentations/archive/627/… · The CoffeeScript Edge Presented by Trevor Burnham at Philly ETE 2012](https://reader034.vdocument.in/reader034/viewer/2022051511/60048fb2c8d4ab6f9b4a65d7/html5/thumbnails/62.jpg)
More Syntactic Sugar
f() if z # if (z) { f(); }
f?() # if (...) { f(); }
obj? # obj != null;
x ? y # x != null ? x : y;
Wednesday, April 11, 12
![Page 63: The CoffeeScript Edge - Chariot Solutionschariotsolutions.com/wp-content/uploads/presentations/archive/627/… · The CoffeeScript Edge Presented by Trevor Burnham at Philly ETE 2012](https://reader034.vdocument.in/reader034/viewer/2022051511/60048fb2c8d4ab6f9b4a65d7/html5/thumbnails/63.jpg)
More Syntactic Sugar
f() if z # if (z) { f(); }
f?() # if (...) { f(); }
obj? # obj != null;
x ? y # x != null ? x : y;
Plus, significant whitespace...
Wednesday, April 11, 12
![Page 64: The CoffeeScript Edge - Chariot Solutionschariotsolutions.com/wp-content/uploads/presentations/archive/627/… · The CoffeeScript Edge Presented by Trevor Burnham at Philly ETE 2012](https://reader034.vdocument.in/reader034/viewer/2022051511/60048fb2c8d4ab6f9b4a65d7/html5/thumbnails/64.jpg)
The Beauty of Indentationsource: https://github.com/TrevorBurnham/connect-assets
Wednesday, April 11, 12
![Page 65: The CoffeeScript Edge - Chariot Solutionschariotsolutions.com/wp-content/uploads/presentations/archive/627/… · The CoffeeScript Edge Presented by Trevor Burnham at Philly ETE 2012](https://reader034.vdocument.in/reader034/viewer/2022051511/60048fb2c8d4ab6f9b4a65d7/html5/thumbnails/65.jpg)
The Beauty of Indentation
for ext in exts sourcePath = stripExt(route) + ".#{ext}" try stats = fs.statSync @absPath(sourcePath) if ext is 'css' {mtime} = stats if timeEq mtime, @cache.map[route]?.mtime css = @cache.map[route].data else css = fs.readFileSync @absPath(sourcePath)
source: https://github.com/TrevorBurnham/connect-assets
Wednesday, April 11, 12
![Page 66: The CoffeeScript Edge - Chariot Solutionschariotsolutions.com/wp-content/uploads/presentations/archive/627/… · The CoffeeScript Edge Presented by Trevor Burnham at Philly ETE 2012](https://reader034.vdocument.in/reader034/viewer/2022051511/60048fb2c8d4ab6f9b4a65d7/html5/thumbnails/66.jpg)
The Curly-Braced Equivalent
Wednesday, April 11, 12
![Page 67: The CoffeeScript Edge - Chariot Solutionschariotsolutions.com/wp-content/uploads/presentations/archive/627/… · The CoffeeScript Edge Presented by Trevor Burnham at Philly ETE 2012](https://reader034.vdocument.in/reader034/viewer/2022051511/60048fb2c8d4ab6f9b4a65d7/html5/thumbnails/67.jpg)
The Curly-Braced Equivalentvar css, ext, mtime, sourcePath, stats, _i, _len, _ref;for (_i = 0, _len = exts.length; _i < _len; _i++) { ext = exts[_i]; sourcePath = stripExt(route) + ("." + ext); try { stats = fs.statSync(this.absPath(sourcePath)); if (ext === 'css') { mtime = stats.mtime; if (timeEq(mtime, (_ref = this.cache.map[route]) != null ? _ref.mtime : void 0)) { css = this.cache.map[route].data; } else { css = fs.readFileSync(this.absPath(sourcePath)); } } } catch (_e) {}}
Wednesday, April 11, 12
![Page 68: The CoffeeScript Edge - Chariot Solutionschariotsolutions.com/wp-content/uploads/presentations/archive/627/… · The CoffeeScript Edge Presented by Trevor Burnham at Philly ETE 2012](https://reader034.vdocument.in/reader034/viewer/2022051511/60048fb2c8d4ab6f9b4a65d7/html5/thumbnails/68.jpg)
Wednesday, April 11, 12
![Page 69: The CoffeeScript Edge - Chariot Solutionschariotsolutions.com/wp-content/uploads/presentations/archive/627/… · The CoffeeScript Edge Presented by Trevor Burnham at Philly ETE 2012](https://reader034.vdocument.in/reader034/viewer/2022051511/60048fb2c8d4ab6f9b4a65d7/html5/thumbnails/69.jpg)
Language Features
II
Wednesday, April 11, 12
![Page 70: The CoffeeScript Edge - Chariot Solutionschariotsolutions.com/wp-content/uploads/presentations/archive/627/… · The CoffeeScript Edge Presented by Trevor Burnham at Philly ETE 2012](https://reader034.vdocument.in/reader034/viewer/2022051511/60048fb2c8d4ab6f9b4a65d7/html5/thumbnails/70.jpg)
The Wrapper
Wednesday, April 11, 12
![Page 71: The CoffeeScript Edge - Chariot Solutionschariotsolutions.com/wp-content/uploads/presentations/archive/627/… · The CoffeeScript Edge Presented by Trevor Burnham at Philly ETE 2012](https://reader034.vdocument.in/reader034/viewer/2022051511/60048fb2c8d4ab6f9b4a65d7/html5/thumbnails/71.jpg)
The Wrapper
CoffeeScript in:
console.log i for i in arr
JavaScript out:(function() { var i, _i, _len; for (_i = 0, _len = arr.length; _i < _len; _i++) { i = arr[_i]; console.log(i); }}).call(this);
Wednesday, April 11, 12
![Page 72: The CoffeeScript Edge - Chariot Solutionschariotsolutions.com/wp-content/uploads/presentations/archive/627/… · The CoffeeScript Edge Presented by Trevor Burnham at Philly ETE 2012](https://reader034.vdocument.in/reader034/viewer/2022051511/60048fb2c8d4ab6f9b4a65d7/html5/thumbnails/72.jpg)
Why Use The Wrapper?source: http://stackoverflow.com/questions/5211638/
Wednesday, April 11, 12
![Page 73: The CoffeeScript Edge - Chariot Solutionschariotsolutions.com/wp-content/uploads/presentations/archive/627/… · The CoffeeScript Edge Presented by Trevor Burnham at Philly ETE 2012](https://reader034.vdocument.in/reader034/viewer/2022051511/60048fb2c8d4ab6f9b4a65d7/html5/thumbnails/73.jpg)
Wednesday, April 11, 12
![Page 74: The CoffeeScript Edge - Chariot Solutionschariotsolutions.com/wp-content/uploads/presentations/archive/627/… · The CoffeeScript Edge Presented by Trevor Burnham at Philly ETE 2012](https://reader034.vdocument.in/reader034/viewer/2022051511/60048fb2c8d4ab6f9b4a65d7/html5/thumbnails/74.jpg)
Things That Don’t Create Scopein JavaScript
Wednesday, April 11, 12
![Page 75: The CoffeeScript Edge - Chariot Solutionschariotsolutions.com/wp-content/uploads/presentations/archive/627/… · The CoffeeScript Edge Presented by Trevor Burnham at Philly ETE 2012](https://reader034.vdocument.in/reader034/viewer/2022051511/60048fb2c8d4ab6f9b4a65d7/html5/thumbnails/75.jpg)
Things That Don’t Create Scopein JavaScript
Conditionals
Wednesday, April 11, 12
![Page 76: The CoffeeScript Edge - Chariot Solutionschariotsolutions.com/wp-content/uploads/presentations/archive/627/… · The CoffeeScript Edge Presented by Trevor Burnham at Philly ETE 2012](https://reader034.vdocument.in/reader034/viewer/2022051511/60048fb2c8d4ab6f9b4a65d7/html5/thumbnails/76.jpg)
Things That Don’t Create Scopein JavaScript
Conditionals
Parentheses
Wednesday, April 11, 12
![Page 77: The CoffeeScript Edge - Chariot Solutionschariotsolutions.com/wp-content/uploads/presentations/archive/627/… · The CoffeeScript Edge Presented by Trevor Burnham at Philly ETE 2012](https://reader034.vdocument.in/reader034/viewer/2022051511/60048fb2c8d4ab6f9b4a65d7/html5/thumbnails/77.jpg)
Things That Don’t Create Scopein JavaScript
Conditionals
Parentheses
Objects
Wednesday, April 11, 12
![Page 78: The CoffeeScript Edge - Chariot Solutionschariotsolutions.com/wp-content/uploads/presentations/archive/627/… · The CoffeeScript Edge Presented by Trevor Burnham at Philly ETE 2012](https://reader034.vdocument.in/reader034/viewer/2022051511/60048fb2c8d4ab6f9b4a65d7/html5/thumbnails/78.jpg)
Things That Don’t Create Scopein JavaScript
Conditionals
Parentheses
Objects
Loops
Wednesday, April 11, 12
![Page 79: The CoffeeScript Edge - Chariot Solutionschariotsolutions.com/wp-content/uploads/presentations/archive/627/… · The CoffeeScript Edge Presented by Trevor Burnham at Philly ETE 2012](https://reader034.vdocument.in/reader034/viewer/2022051511/60048fb2c8d4ab6f9b4a65d7/html5/thumbnails/79.jpg)
Things That Don’t Create Scopein JavaScript
Conditionals
Parentheses
Objects
Loops
Files (!)
Wednesday, April 11, 12
![Page 80: The CoffeeScript Edge - Chariot Solutionschariotsolutions.com/wp-content/uploads/presentations/archive/627/… · The CoffeeScript Edge Presented by Trevor Burnham at Philly ETE 2012](https://reader034.vdocument.in/reader034/viewer/2022051511/60048fb2c8d4ab6f9b4a65d7/html5/thumbnails/80.jpg)
Wednesday, April 11, 12
![Page 81: The CoffeeScript Edge - Chariot Solutionschariotsolutions.com/wp-content/uploads/presentations/archive/627/… · The CoffeeScript Edge Presented by Trevor Burnham at Philly ETE 2012](https://reader034.vdocument.in/reader034/viewer/2022051511/60048fb2c8d4ab6f9b4a65d7/html5/thumbnails/81.jpg)
http://blog.meloncard.com/post/12175941935
Don’t Let This Happen to You!
Wednesday, April 11, 12
![Page 82: The CoffeeScript Edge - Chariot Solutionschariotsolutions.com/wp-content/uploads/presentations/archive/627/… · The CoffeeScript Edge Presented by Trevor Burnham at Philly ETE 2012](https://reader034.vdocument.in/reader034/viewer/2022051511/60048fb2c8d4ab6f9b4a65d7/html5/thumbnails/82.jpg)
CoffeeScripters Need No var!
Wednesday, April 11, 12
![Page 83: The CoffeeScript Edge - Chariot Solutionschariotsolutions.com/wp-content/uploads/presentations/archive/627/… · The CoffeeScript Edge Presented by Trevor Burnham at Philly ETE 2012](https://reader034.vdocument.in/reader034/viewer/2022051511/60048fb2c8d4ab6f9b4a65d7/html5/thumbnails/83.jpg)
CoffeeScripters Need No var!
console.log i for i in arr
(function() { var i, _i, _len; for (_i = 0, _len = arr.length; _i < _len; _i++) { i = arr[_i]; console.log(i); }}).call(this);
Wednesday, April 11, 12
![Page 84: The CoffeeScript Edge - Chariot Solutionschariotsolutions.com/wp-content/uploads/presentations/archive/627/… · The CoffeeScript Edge Presented by Trevor Burnham at Philly ETE 2012](https://reader034.vdocument.in/reader034/viewer/2022051511/60048fb2c8d4ab6f9b4a65d7/html5/thumbnails/84.jpg)
JS Best Practices,CoffeeScript Defaults!
Wednesday, April 11, 12
![Page 85: The CoffeeScript Edge - Chariot Solutionschariotsolutions.com/wp-content/uploads/presentations/archive/627/… · The CoffeeScript Edge Presented by Trevor Burnham at Philly ETE 2012](https://reader034.vdocument.in/reader034/viewer/2022051511/60048fb2c8d4ab6f9b4a65d7/html5/thumbnails/85.jpg)
JS Best Practices,CoffeeScript Defaults!
Parappa the Wrapper
Wednesday, April 11, 12
![Page 86: The CoffeeScript Edge - Chariot Solutionschariotsolutions.com/wp-content/uploads/presentations/archive/627/… · The CoffeeScript Edge Presented by Trevor Burnham at Philly ETE 2012](https://reader034.vdocument.in/reader034/viewer/2022051511/60048fb2c8d4ab6f9b4a65d7/html5/thumbnails/86.jpg)
JS Best Practices,CoffeeScript Defaults!
Parappa the Wrapper
Proper Indentation
Wednesday, April 11, 12
![Page 87: The CoffeeScript Edge - Chariot Solutionschariotsolutions.com/wp-content/uploads/presentations/archive/627/… · The CoffeeScript Edge Presented by Trevor Burnham at Philly ETE 2012](https://reader034.vdocument.in/reader034/viewer/2022051511/60048fb2c8d4ab6f9b4a65d7/html5/thumbnails/87.jpg)
JS Best Practices,CoffeeScript Defaults!
Parappa the Wrapper
Proper Indentation
Avoiding ==
Wednesday, April 11, 12
![Page 88: The CoffeeScript Edge - Chariot Solutionschariotsolutions.com/wp-content/uploads/presentations/archive/627/… · The CoffeeScript Edge Presented by Trevor Burnham at Philly ETE 2012](https://reader034.vdocument.in/reader034/viewer/2022051511/60048fb2c8d4ab6f9b4a65d7/html5/thumbnails/88.jpg)
JS Best Practices,CoffeeScript Defaults!
Parappa the Wrapper
Proper Indentation
Avoiding ==
Packaging extensible objects as “classes”
Wednesday, April 11, 12
![Page 89: The CoffeeScript Edge - Chariot Solutionschariotsolutions.com/wp-content/uploads/presentations/archive/627/… · The CoffeeScript Edge Presented by Trevor Burnham at Philly ETE 2012](https://reader034.vdocument.in/reader034/viewer/2022051511/60048fb2c8d4ab6f9b4a65d7/html5/thumbnails/89.jpg)
Plain, Ordinary JavaScript Objects
Wednesday, April 11, 12
![Page 90: The CoffeeScript Edge - Chariot Solutionschariotsolutions.com/wp-content/uploads/presentations/archive/627/… · The CoffeeScript Edge Presented by Trevor Burnham at Philly ETE 2012](https://reader034.vdocument.in/reader034/viewer/2022051511/60048fb2c8d4ab6f9b4a65d7/html5/thumbnails/90.jpg)
Plain, Ordinary JavaScript Objects
lifeEtAl = answer: 42 showAnswer: -> console.log @answer # @ == this
Wednesday, April 11, 12
![Page 91: The CoffeeScript Edge - Chariot Solutionschariotsolutions.com/wp-content/uploads/presentations/archive/627/… · The CoffeeScript Edge Presented by Trevor Burnham at Philly ETE 2012](https://reader034.vdocument.in/reader034/viewer/2022051511/60048fb2c8d4ab6f9b4a65d7/html5/thumbnails/91.jpg)
Plain, Ordinary JavaScript Objects
lifeEtAl = answer: 42 showAnswer: -> console.log @answer # @ == this
lifeEtAl.showAnswer()
Wednesday, April 11, 12
![Page 92: The CoffeeScript Edge - Chariot Solutionschariotsolutions.com/wp-content/uploads/presentations/archive/627/… · The CoffeeScript Edge Presented by Trevor Burnham at Philly ETE 2012](https://reader034.vdocument.in/reader034/viewer/2022051511/60048fb2c8d4ab6f9b4a65d7/html5/thumbnails/92.jpg)
Plain, Ordinary JavaScript Objects
lifeEtAl = answer: 42 showAnswer: -> console.log @answer # @ == this
lifeEtAl.showAnswer()
setTimeout lifeEtAl.showAnswer, 10
Wednesday, April 11, 12
![Page 93: The CoffeeScript Edge - Chariot Solutionschariotsolutions.com/wp-content/uploads/presentations/archive/627/… · The CoffeeScript Edge Presented by Trevor Burnham at Philly ETE 2012](https://reader034.vdocument.in/reader034/viewer/2022051511/60048fb2c8d4ab6f9b4a65d7/html5/thumbnails/93.jpg)
Wednesday, April 11, 12
![Page 94: The CoffeeScript Edge - Chariot Solutionschariotsolutions.com/wp-content/uploads/presentations/archive/627/… · The CoffeeScript Edge Presented by Trevor Burnham at Philly ETE 2012](https://reader034.vdocument.in/reader034/viewer/2022051511/60048fb2c8d4ab6f9b4a65d7/html5/thumbnails/94.jpg)
Classes to the Rescue!
Wednesday, April 11, 12
![Page 95: The CoffeeScript Edge - Chariot Solutionschariotsolutions.com/wp-content/uploads/presentations/archive/627/… · The CoffeeScript Edge Presented by Trevor Burnham at Philly ETE 2012](https://reader034.vdocument.in/reader034/viewer/2022051511/60048fb2c8d4ab6f9b4a65d7/html5/thumbnails/95.jpg)
Classes to the Rescue!
class LifeEtAl answer: 42 showAnswer: => # fat -> console.log @answer
Wednesday, April 11, 12
![Page 96: The CoffeeScript Edge - Chariot Solutionschariotsolutions.com/wp-content/uploads/presentations/archive/627/… · The CoffeeScript Edge Presented by Trevor Burnham at Philly ETE 2012](https://reader034.vdocument.in/reader034/viewer/2022051511/60048fb2c8d4ab6f9b4a65d7/html5/thumbnails/96.jpg)
Classes to the Rescue!
class LifeEtAl answer: 42 showAnswer: => # fat -> console.log @answer
myLife = new LifeEtAl
Wednesday, April 11, 12
![Page 97: The CoffeeScript Edge - Chariot Solutionschariotsolutions.com/wp-content/uploads/presentations/archive/627/… · The CoffeeScript Edge Presented by Trevor Burnham at Philly ETE 2012](https://reader034.vdocument.in/reader034/viewer/2022051511/60048fb2c8d4ab6f9b4a65d7/html5/thumbnails/97.jpg)
Classes to the Rescue!
class LifeEtAl answer: 42 showAnswer: => # fat -> console.log @answer
myLife = new LifeEtAl
setTimeout myLife.showAnswer, 10
Wednesday, April 11, 12
![Page 98: The CoffeeScript Edge - Chariot Solutionschariotsolutions.com/wp-content/uploads/presentations/archive/627/… · The CoffeeScript Edge Presented by Trevor Burnham at Philly ETE 2012](https://reader034.vdocument.in/reader034/viewer/2022051511/60048fb2c8d4ab6f9b4a65d7/html5/thumbnails/98.jpg)
How About a Little Privacy?
Wednesday, April 11, 12
![Page 99: The CoffeeScript Edge - Chariot Solutionschariotsolutions.com/wp-content/uploads/presentations/archive/627/… · The CoffeeScript Edge Presented by Trevor Burnham at Philly ETE 2012](https://reader034.vdocument.in/reader034/viewer/2022051511/60048fb2c8d4ab6f9b4a65d7/html5/thumbnails/99.jpg)
How About a Little Privacy?
class LifeEtAl answer = 42 showAnswer: -> console.log answer
Wednesday, April 11, 12
![Page 100: The CoffeeScript Edge - Chariot Solutionschariotsolutions.com/wp-content/uploads/presentations/archive/627/… · The CoffeeScript Edge Presented by Trevor Burnham at Philly ETE 2012](https://reader034.vdocument.in/reader034/viewer/2022051511/60048fb2c8d4ab6f9b4a65d7/html5/thumbnails/100.jpg)
How About a Little Privacy?
class LifeEtAl answer = 42 showAnswer: -> console.log answer
myLife = new LifeEtAl
Wednesday, April 11, 12
![Page 101: The CoffeeScript Edge - Chariot Solutionschariotsolutions.com/wp-content/uploads/presentations/archive/627/… · The CoffeeScript Edge Presented by Trevor Burnham at Philly ETE 2012](https://reader034.vdocument.in/reader034/viewer/2022051511/60048fb2c8d4ab6f9b4a65d7/html5/thumbnails/101.jpg)
How About a Little Privacy?
class LifeEtAl answer = 42 showAnswer: -> console.log answer
myLife = new LifeEtAl
setTimeout myLife.showAnswer, 10
Wednesday, April 11, 12
![Page 102: The CoffeeScript Edge - Chariot Solutionschariotsolutions.com/wp-content/uploads/presentations/archive/627/… · The CoffeeScript Edge Presented by Trevor Burnham at Philly ETE 2012](https://reader034.vdocument.in/reader034/viewer/2022051511/60048fb2c8d4ab6f9b4a65d7/html5/thumbnails/102.jpg)
Using a Constructor
Wednesday, April 11, 12
![Page 103: The CoffeeScript Edge - Chariot Solutionschariotsolutions.com/wp-content/uploads/presentations/archive/627/… · The CoffeeScript Edge Presented by Trevor Burnham at Philly ETE 2012](https://reader034.vdocument.in/reader034/viewer/2022051511/60048fb2c8d4ab6f9b4a65d7/html5/thumbnails/103.jpg)
class Circle twoPi = Math.PI * 2 constructor: (@radius) -> @radiusSqr = Math.pow @radius, 2 diameter: => twoPi * @radius area: => Math.PI * @radiusSqr
Using a Constructor
Wednesday, April 11, 12
![Page 104: The CoffeeScript Edge - Chariot Solutionschariotsolutions.com/wp-content/uploads/presentations/archive/627/… · The CoffeeScript Edge Presented by Trevor Burnham at Philly ETE 2012](https://reader034.vdocument.in/reader034/viewer/2022051511/60048fb2c8d4ab6f9b4a65d7/html5/thumbnails/104.jpg)
class Circle twoPi = Math.PI * 2 constructor: (@radius) -> @radiusSqr = Math.pow @radius, 2 diameter: => twoPi * @radius area: => Math.PI * @radiusSqr
c = new Circle(5)console.log c.diameter() # 31.4159console.log c.area() # 78.5398
Using a Constructor
Wednesday, April 11, 12
![Page 105: The CoffeeScript Edge - Chariot Solutionschariotsolutions.com/wp-content/uploads/presentations/archive/627/… · The CoffeeScript Edge Presented by Trevor Burnham at Philly ETE 2012](https://reader034.vdocument.in/reader034/viewer/2022051511/60048fb2c8d4ab6f9b4a65d7/html5/thumbnails/105.jpg)
Let’s Try a Little Inheritance
Wednesday, April 11, 12
![Page 106: The CoffeeScript Edge - Chariot Solutionschariotsolutions.com/wp-content/uploads/presentations/archive/627/… · The CoffeeScript Edge Presented by Trevor Burnham at Philly ETE 2012](https://reader034.vdocument.in/reader034/viewer/2022051511/60048fb2c8d4ab6f9b4a65d7/html5/thumbnails/106.jpg)
Let’s Try a Little Inheritance
class Document extends Backbone.Model defaults: title: 'Untitled'
Wednesday, April 11, 12
![Page 107: The CoffeeScript Edge - Chariot Solutionschariotsolutions.com/wp-content/uploads/presentations/archive/627/… · The CoffeeScript Edge Presented by Trevor Burnham at Philly ETE 2012](https://reader034.vdocument.in/reader034/viewer/2022051511/60048fb2c8d4ab6f9b4a65d7/html5/thumbnails/107.jpg)
Doing Inheritance via aJavaScript Library
Wednesday, April 11, 12
![Page 108: The CoffeeScript Edge - Chariot Solutionschariotsolutions.com/wp-content/uploads/presentations/archive/627/… · The CoffeeScript Edge Presented by Trevor Burnham at Philly ETE 2012](https://reader034.vdocument.in/reader034/viewer/2022051511/60048fb2c8d4ab6f9b4a65d7/html5/thumbnails/108.jpg)
Doing Inheritance via aJavaScript Library
var Document = Backbone.Model.extend({ defaults: { title: 'Untitled' }});
Wednesday, April 11, 12
![Page 109: The CoffeeScript Edge - Chariot Solutionschariotsolutions.com/wp-content/uploads/presentations/archive/627/… · The CoffeeScript Edge Presented by Trevor Burnham at Philly ETE 2012](https://reader034.vdocument.in/reader034/viewer/2022051511/60048fb2c8d4ab6f9b4a65d7/html5/thumbnails/109.jpg)
Wednesday, April 11, 12
![Page 110: The CoffeeScript Edge - Chariot Solutionschariotsolutions.com/wp-content/uploads/presentations/archive/627/… · The CoffeeScript Edge Presented by Trevor Burnham at Philly ETE 2012](https://reader034.vdocument.in/reader034/viewer/2022051511/60048fb2c8d4ab6f9b4a65d7/html5/thumbnails/110.jpg)
I. The Prototype Chain
Wednesday, April 11, 12
![Page 111: The CoffeeScript Edge - Chariot Solutionschariotsolutions.com/wp-content/uploads/presentations/archive/627/… · The CoffeeScript Edge Presented by Trevor Burnham at Philly ETE 2012](https://reader034.vdocument.in/reader034/viewer/2022051511/60048fb2c8d4ab6f9b4a65d7/html5/thumbnails/111.jpg)
I. The Prototype Chainclass Document extends Backbone.Model defaults: title: 'Untitled'
Wednesday, April 11, 12
![Page 112: The CoffeeScript Edge - Chariot Solutionschariotsolutions.com/wp-content/uploads/presentations/archive/627/… · The CoffeeScript Edge Presented by Trevor Burnham at Philly ETE 2012](https://reader034.vdocument.in/reader034/viewer/2022051511/60048fb2c8d4ab6f9b4a65d7/html5/thumbnails/112.jpg)
I. The Prototype Chainclass Document extends Backbone.Model defaults: title: 'Untitled'
doc = new Document
Wednesday, April 11, 12
![Page 113: The CoffeeScript Edge - Chariot Solutionschariotsolutions.com/wp-content/uploads/presentations/archive/627/… · The CoffeeScript Edge Presented by Trevor Burnham at Philly ETE 2012](https://reader034.vdocument.in/reader034/viewer/2022051511/60048fb2c8d4ab6f9b4a65d7/html5/thumbnails/113.jpg)
I. The Prototype Chainclass Document extends Backbone.Model defaults: title: 'Untitled'
doc = new Document
Document:: is Document.prototype
Wednesday, April 11, 12
![Page 114: The CoffeeScript Edge - Chariot Solutionschariotsolutions.com/wp-content/uploads/presentations/archive/627/… · The CoffeeScript Edge Presented by Trevor Burnham at Philly ETE 2012](https://reader034.vdocument.in/reader034/viewer/2022051511/60048fb2c8d4ab6f9b4a65d7/html5/thumbnails/114.jpg)
I. The Prototype Chainclass Document extends Backbone.Model defaults: title: 'Untitled'
doc = new Document
Document:: is Document.prototype
doc.defaults is Document::defaults
Wednesday, April 11, 12
![Page 115: The CoffeeScript Edge - Chariot Solutionschariotsolutions.com/wp-content/uploads/presentations/archive/627/… · The CoffeeScript Edge Presented by Trevor Burnham at Philly ETE 2012](https://reader034.vdocument.in/reader034/viewer/2022051511/60048fb2c8d4ab6f9b4a65d7/html5/thumbnails/115.jpg)
I. The Prototype Chainclass Document extends Backbone.Model defaults: title: 'Untitled'
doc = new Document
Document:: is Document.prototype
doc.defaults is Document::defaults
doc.validate is Backbone.Model::validate
Wednesday, April 11, 12
![Page 116: The CoffeeScript Edge - Chariot Solutionschariotsolutions.com/wp-content/uploads/presentations/archive/627/… · The CoffeeScript Edge Presented by Trevor Burnham at Philly ETE 2012](https://reader034.vdocument.in/reader034/viewer/2022051511/60048fb2c8d4ab6f9b4a65d7/html5/thumbnails/116.jpg)
I. The Prototype Chainclass Document extends Backbone.Model defaults: title: 'Untitled'
doc = new Document
Document:: is Document.prototype
doc.defaults is Document::defaults
doc.validate is Backbone.Model::validate
doc.hasOwnProperty is Object::hasOwnProperty
Wednesday, April 11, 12
![Page 117: The CoffeeScript Edge - Chariot Solutionschariotsolutions.com/wp-content/uploads/presentations/archive/627/… · The CoffeeScript Edge Presented by Trevor Burnham at Philly ETE 2012](https://reader034.vdocument.in/reader034/viewer/2022051511/60048fb2c8d4ab6f9b4a65d7/html5/thumbnails/117.jpg)
II. Superclass Methods Can BeInvoked With super
Wednesday, April 11, 12
![Page 118: The CoffeeScript Edge - Chariot Solutionschariotsolutions.com/wp-content/uploads/presentations/archive/627/… · The CoffeeScript Edge Presented by Trevor Burnham at Philly ETE 2012](https://reader034.vdocument.in/reader034/viewer/2022051511/60048fb2c8d4ab6f9b4a65d7/html5/thumbnails/118.jpg)
II. Superclass Methods Can BeInvoked With super
class AppleDevice constructor: (cost) -‐> bankAccount.deduct cost bankAccount.deduct cost / 4 # AppleCare
Wednesday, April 11, 12
![Page 119: The CoffeeScript Edge - Chariot Solutionschariotsolutions.com/wp-content/uploads/presentations/archive/627/… · The CoffeeScript Edge Presented by Trevor Burnham at Philly ETE 2012](https://reader034.vdocument.in/reader034/viewer/2022051511/60048fb2c8d4ab6f9b4a65d7/html5/thumbnails/119.jpg)
II. Superclass Methods Can BeInvoked With super
class AppleDevice constructor: (cost) -‐> bankAccount.deduct cost bankAccount.deduct cost / 4 # AppleCare
class iPhone extends AppleDevice constructor: (cost) -‐> super # equivalent to super(cost) setInterval (-‐> bankAccount.deduct cost / 4 ), ONE_MONTH
Wednesday, April 11, 12
![Page 120: The CoffeeScript Edge - Chariot Solutionschariotsolutions.com/wp-content/uploads/presentations/archive/627/… · The CoffeeScript Edge Presented by Trevor Burnham at Philly ETE 2012](https://reader034.vdocument.in/reader034/viewer/2022051511/60048fb2c8d4ab6f9b4a65d7/html5/thumbnails/120.jpg)
III. Superclass Properties are Copied
Wednesday, April 11, 12
![Page 121: The CoffeeScript Edge - Chariot Solutionschariotsolutions.com/wp-content/uploads/presentations/archive/627/… · The CoffeeScript Edge Presented by Trevor Burnham at Philly ETE 2012](https://reader034.vdocument.in/reader034/viewer/2022051511/60048fb2c8d4ab6f9b4a65d7/html5/thumbnails/121.jpg)
III. Superclass Properties are Copied
class Primate @thumbs = 'opposable'
Wednesday, April 11, 12
![Page 122: The CoffeeScript Edge - Chariot Solutionschariotsolutions.com/wp-content/uploads/presentations/archive/627/… · The CoffeeScript Edge Presented by Trevor Burnham at Philly ETE 2012](https://reader034.vdocument.in/reader034/viewer/2022051511/60048fb2c8d4ab6f9b4a65d7/html5/thumbnails/122.jpg)
III. Superclass Properties are Copied
class Primate @thumbs = 'opposable'
class Human extends Primate
Wednesday, April 11, 12
![Page 123: The CoffeeScript Edge - Chariot Solutionschariotsolutions.com/wp-content/uploads/presentations/archive/627/… · The CoffeeScript Edge Presented by Trevor Burnham at Philly ETE 2012](https://reader034.vdocument.in/reader034/viewer/2022051511/60048fb2c8d4ab6f9b4a65d7/html5/thumbnails/123.jpg)
III. Superclass Properties are Copied
class Primate @thumbs = 'opposable'
class Human extends Primate
Human.thumbs is Primate.thumbs is 'opposable'
Wednesday, April 11, 12
![Page 124: The CoffeeScript Edge - Chariot Solutionschariotsolutions.com/wp-content/uploads/presentations/archive/627/… · The CoffeeScript Edge Presented by Trevor Burnham at Philly ETE 2012](https://reader034.vdocument.in/reader034/viewer/2022051511/60048fb2c8d4ab6f9b4a65d7/html5/thumbnails/124.jpg)
Wednesday, April 11, 12
![Page 125: The CoffeeScript Edge - Chariot Solutionschariotsolutions.com/wp-content/uploads/presentations/archive/627/… · The CoffeeScript Edge Presented by Trevor Burnham at Philly ETE 2012](https://reader034.vdocument.in/reader034/viewer/2022051511/60048fb2c8d4ab6f9b4a65d7/html5/thumbnails/125.jpg)
Working with CoffeeScript
III
Wednesday, April 11, 12
![Page 126: The CoffeeScript Edge - Chariot Solutionschariotsolutions.com/wp-content/uploads/presentations/archive/627/… · The CoffeeScript Edge Presented by Trevor Burnham at Philly ETE 2012](https://reader034.vdocument.in/reader034/viewer/2022051511/60048fb2c8d4ab6f9b4a65d7/html5/thumbnails/126.jpg)
Installing coffee
Wednesday, April 11, 12
![Page 127: The CoffeeScript Edge - Chariot Solutionschariotsolutions.com/wp-content/uploads/presentations/archive/627/… · The CoffeeScript Edge Presented by Trevor Burnham at Philly ETE 2012](https://reader034.vdocument.in/reader034/viewer/2022051511/60048fb2c8d4ab6f9b4a65d7/html5/thumbnails/127.jpg)
Installing coffee
Step 1: Install Node
Wednesday, April 11, 12
![Page 128: The CoffeeScript Edge - Chariot Solutionschariotsolutions.com/wp-content/uploads/presentations/archive/627/… · The CoffeeScript Edge Presented by Trevor Burnham at Philly ETE 2012](https://reader034.vdocument.in/reader034/viewer/2022051511/60048fb2c8d4ab6f9b4a65d7/html5/thumbnails/128.jpg)
Installing coffee
Step 1: Install Node
Step 2: npm install -‐g coffee-‐script
Wednesday, April 11, 12
![Page 129: The CoffeeScript Edge - Chariot Solutionschariotsolutions.com/wp-content/uploads/presentations/archive/627/… · The CoffeeScript Edge Presented by Trevor Burnham at Philly ETE 2012](https://reader034.vdocument.in/reader034/viewer/2022051511/60048fb2c8d4ab6f9b4a65d7/html5/thumbnails/129.jpg)
Installing coffee
Step 1: Install Node
Step 2: npm install -‐g coffee-‐script
Want a different version?npm install -‐g coffee-‐[email protected]
Wednesday, April 11, 12
![Page 130: The CoffeeScript Edge - Chariot Solutionschariotsolutions.com/wp-content/uploads/presentations/archive/627/… · The CoffeeScript Edge Presented by Trevor Burnham at Philly ETE 2012](https://reader034.vdocument.in/reader034/viewer/2022051511/60048fb2c8d4ab6f9b4a65d7/html5/thumbnails/130.jpg)
Installing coffee
Step 1: Install Node
Step 2: npm install -‐g coffee-‐script
Want a different version?npm install -‐g coffee-‐[email protected]
Wednesday, April 11, 12
![Page 131: The CoffeeScript Edge - Chariot Solutionschariotsolutions.com/wp-content/uploads/presentations/archive/627/… · The CoffeeScript Edge Presented by Trevor Burnham at Philly ETE 2012](https://reader034.vdocument.in/reader034/viewer/2022051511/60048fb2c8d4ab6f9b4a65d7/html5/thumbnails/131.jpg)
Compiling
Wednesday, April 11, 12
![Page 132: The CoffeeScript Edge - Chariot Solutionschariotsolutions.com/wp-content/uploads/presentations/archive/627/… · The CoffeeScript Edge Presented by Trevor Burnham at Philly ETE 2012](https://reader034.vdocument.in/reader034/viewer/2022051511/60048fb2c8d4ab6f9b4a65d7/html5/thumbnails/132.jpg)
Compiling
coffee -‐w
Wednesday, April 11, 12
![Page 133: The CoffeeScript Edge - Chariot Solutionschariotsolutions.com/wp-content/uploads/presentations/archive/627/… · The CoffeeScript Edge Presented by Trevor Burnham at Philly ETE 2012](https://reader034.vdocument.in/reader034/viewer/2022051511/60048fb2c8d4ab6f9b4a65d7/html5/thumbnails/133.jpg)
Compiling
coffee -‐w
Rails / other web frameworks
Wednesday, April 11, 12
![Page 134: The CoffeeScript Edge - Chariot Solutionschariotsolutions.com/wp-content/uploads/presentations/archive/627/… · The CoffeeScript Edge Presented by Trevor Burnham at Philly ETE 2012](https://reader034.vdocument.in/reader034/viewer/2022051511/60048fb2c8d4ab6f9b4a65d7/html5/thumbnails/134.jpg)
Compiling
coffee -‐w
Rails / other web frameworks
Middleman / other static web frameworks
Wednesday, April 11, 12
![Page 135: The CoffeeScript Edge - Chariot Solutionschariotsolutions.com/wp-content/uploads/presentations/archive/627/… · The CoffeeScript Edge Presented by Trevor Burnham at Philly ETE 2012](https://reader034.vdocument.in/reader034/viewer/2022051511/60048fb2c8d4ab6f9b4a65d7/html5/thumbnails/135.jpg)
Compiling
coffee -‐w
Rails / other web frameworks
Middleman / other static web frameworks
LiveReload (Mac)
Wednesday, April 11, 12
![Page 136: The CoffeeScript Edge - Chariot Solutionschariotsolutions.com/wp-content/uploads/presentations/archive/627/… · The CoffeeScript Edge Presented by Trevor Burnham at Philly ETE 2012](https://reader034.vdocument.in/reader034/viewer/2022051511/60048fb2c8d4ab6f9b4a65d7/html5/thumbnails/136.jpg)
Compiling
coffee -‐w
Rails / other web frameworks
Middleman / other static web frameworks
LiveReload (Mac)
Write a Cakefile
Wednesday, April 11, 12
![Page 137: The CoffeeScript Edge - Chariot Solutionschariotsolutions.com/wp-content/uploads/presentations/archive/627/… · The CoffeeScript Edge Presented by Trevor Burnham at Philly ETE 2012](https://reader034.vdocument.in/reader034/viewer/2022051511/60048fb2c8d4ab6f9b4a65d7/html5/thumbnails/137.jpg)
A Piece of Cakesource: https://github.com/sstephenson/node-coffee-project/
Wednesday, April 11, 12
![Page 138: The CoffeeScript Edge - Chariot Solutionschariotsolutions.com/wp-content/uploads/presentations/archive/627/… · The CoffeeScript Edge Presented by Trevor Burnham at Philly ETE 2012](https://reader034.vdocument.in/reader034/viewer/2022051511/60048fb2c8d4ab6f9b4a65d7/html5/thumbnails/138.jpg)
A Piece of Cake
build = (watch, callback) -> if typeof watch is 'function' callback = watch watch = false options = ['-c', '-o', 'lib', 'src'] options.unshift '-w' if watch coffee = spawn 'coffee', options coffee.stdout.on 'data', (data) -> print data.toString() coffee.stderr.on 'data', (data) -> print data.toString() coffee.on 'exit', (status) -> callback?() if status is 0
task 'build', 'Compile CoffeeScript source files', -> build()
task 'test', 'Run the test suite', -> build -> require.paths.unshift __dirname + "/lib" {reporters} = require 'nodeunit' process.chdir __dirname reporters.default.run ['test']
source: https://github.com/sstephenson/node-coffee-project/
Wednesday, April 11, 12
![Page 139: The CoffeeScript Edge - Chariot Solutionschariotsolutions.com/wp-content/uploads/presentations/archive/627/… · The CoffeeScript Edge Presented by Trevor Burnham at Philly ETE 2012](https://reader034.vdocument.in/reader034/viewer/2022051511/60048fb2c8d4ab6f9b4a65d7/html5/thumbnails/139.jpg)
Wednesday, April 11, 12
![Page 140: The CoffeeScript Edge - Chariot Solutionschariotsolutions.com/wp-content/uploads/presentations/archive/627/… · The CoffeeScript Edge Presented by Trevor Burnham at Philly ETE 2012](https://reader034.vdocument.in/reader034/viewer/2022051511/60048fb2c8d4ab6f9b4a65d7/html5/thumbnails/140.jpg)
Editing
https://github.com/jashkenas/coffee-script/wiki/Text-editor-pluginsWednesday, April 11, 12
![Page 141: The CoffeeScript Edge - Chariot Solutionschariotsolutions.com/wp-content/uploads/presentations/archive/627/… · The CoffeeScript Edge Presented by Trevor Burnham at Philly ETE 2012](https://reader034.vdocument.in/reader034/viewer/2022051511/60048fb2c8d4ab6f9b4a65d7/html5/thumbnails/141.jpg)
Documentingsource: http://coffeescript.org/documentation/docs/grammar.html
Wednesday, April 11, 12
![Page 142: The CoffeeScript Edge - Chariot Solutionschariotsolutions.com/wp-content/uploads/presentations/archive/627/… · The CoffeeScript Edge Presented by Trevor Burnham at Philly ETE 2012](https://reader034.vdocument.in/reader034/viewer/2022051511/60048fb2c8d4ab6f9b4a65d7/html5/thumbnails/142.jpg)
Testing
Wednesday, April 11, 12
![Page 143: The CoffeeScript Edge - Chariot Solutionschariotsolutions.com/wp-content/uploads/presentations/archive/627/… · The CoffeeScript Edge Presented by Trevor Burnham at Philly ETE 2012](https://reader034.vdocument.in/reader034/viewer/2022051511/60048fb2c8d4ab6f9b4a65d7/html5/thumbnails/143.jpg)
Testing
Mocha
Wednesday, April 11, 12
![Page 144: The CoffeeScript Edge - Chariot Solutionschariotsolutions.com/wp-content/uploads/presentations/archive/627/… · The CoffeeScript Edge Presented by Trevor Burnham at Philly ETE 2012](https://reader034.vdocument.in/reader034/viewer/2022051511/60048fb2c8d4ab6f9b4a65d7/html5/thumbnails/144.jpg)
Testing
Mocha
Mocha
Wednesday, April 11, 12
![Page 145: The CoffeeScript Edge - Chariot Solutionschariotsolutions.com/wp-content/uploads/presentations/archive/627/… · The CoffeeScript Edge Presented by Trevor Burnham at Philly ETE 2012](https://reader034.vdocument.in/reader034/viewer/2022051511/60048fb2c8d4ab6f9b4a65d7/html5/thumbnails/145.jpg)
Testing
Mocha
Mocha
Mocha
Wednesday, April 11, 12
![Page 146: The CoffeeScript Edge - Chariot Solutionschariotsolutions.com/wp-content/uploads/presentations/archive/627/… · The CoffeeScript Edge Presented by Trevor Burnham at Philly ETE 2012](https://reader034.vdocument.in/reader034/viewer/2022051511/60048fb2c8d4ab6f9b4a65d7/html5/thumbnails/146.jpg)
Testing
Mocha
Mocha
Mocha
http://visionmedia.github.com/mocha/
Wednesday, April 11, 12
![Page 147: The CoffeeScript Edge - Chariot Solutionschariotsolutions.com/wp-content/uploads/presentations/archive/627/… · The CoffeeScript Edge Presented by Trevor Burnham at Philly ETE 2012](https://reader034.vdocument.in/reader034/viewer/2022051511/60048fb2c8d4ab6f9b4a65d7/html5/thumbnails/147.jpg)
The Future of Web Apps...?
IV
Wednesday, April 11, 12
![Page 148: The CoffeeScript Edge - Chariot Solutionschariotsolutions.com/wp-content/uploads/presentations/archive/627/… · The CoffeeScript Edge Presented by Trevor Burnham at Philly ETE 2012](https://reader034.vdocument.in/reader034/viewer/2022051511/60048fb2c8d4ab6f9b4a65d7/html5/thumbnails/148.jpg)
A New Area of Confusion...
http://stackoverflow.com/questions/7996883/
Wednesday, April 11, 12
![Page 149: The CoffeeScript Edge - Chariot Solutionschariotsolutions.com/wp-content/uploads/presentations/archive/627/… · The CoffeeScript Edge Presented by Trevor Burnham at Philly ETE 2012](https://reader034.vdocument.in/reader034/viewer/2022051511/60048fb2c8d4ab6f9b4a65d7/html5/thumbnails/149.jpg)
Where is Your Code?
http://stackoverflow.com/questions/7996883/
Wednesday, April 11, 12
![Page 150: The CoffeeScript Edge - Chariot Solutionschariotsolutions.com/wp-content/uploads/presentations/archive/627/… · The CoffeeScript Edge Presented by Trevor Burnham at Philly ETE 2012](https://reader034.vdocument.in/reader034/viewer/2022051511/60048fb2c8d4ab6f9b4a65d7/html5/thumbnails/150.jpg)
Where is Your Code?
http://stackoverflow.com/questions/7996883/
Wednesday, April 11, 12
![Page 151: The CoffeeScript Edge - Chariot Solutionschariotsolutions.com/wp-content/uploads/presentations/archive/627/… · The CoffeeScript Edge Presented by Trevor Burnham at Philly ETE 2012](https://reader034.vdocument.in/reader034/viewer/2022051511/60048fb2c8d4ab6f9b4a65d7/html5/thumbnails/151.jpg)
Breaking the Client-ServerBoundaries
Wednesday, April 11, 12
![Page 152: The CoffeeScript Edge - Chariot Solutionschariotsolutions.com/wp-content/uploads/presentations/archive/627/… · The CoffeeScript Edge Presented by Trevor Burnham at Philly ETE 2012](https://reader034.vdocument.in/reader034/viewer/2022051511/60048fb2c8d4ab6f9b4a65d7/html5/thumbnails/152.jpg)
Breaking the Client-ServerBoundaries
Stitch (37signals)
Wednesday, April 11, 12
![Page 153: The CoffeeScript Edge - Chariot Solutionschariotsolutions.com/wp-content/uploads/presentations/archive/627/… · The CoffeeScript Edge Presented by Trevor Burnham at Philly ETE 2012](https://reader034.vdocument.in/reader034/viewer/2022051511/60048fb2c8d4ab6f9b4a65d7/html5/thumbnails/153.jpg)
Breaking the Client-ServerBoundaries
Stitch (37signals)
browserify
Wednesday, April 11, 12
![Page 154: The CoffeeScript Edge - Chariot Solutionschariotsolutions.com/wp-content/uploads/presentations/archive/627/… · The CoffeeScript Edge Presented by Trevor Burnham at Philly ETE 2012](https://reader034.vdocument.in/reader034/viewer/2022051511/60048fb2c8d4ab6f9b4a65d7/html5/thumbnails/154.jpg)
Breaking the Client-ServerBoundaries
Stitch (37signals)
browserify
jsdom
Wednesday, April 11, 12
![Page 155: The CoffeeScript Edge - Chariot Solutionschariotsolutions.com/wp-content/uploads/presentations/archive/627/… · The CoffeeScript Edge Presented by Trevor Burnham at Philly ETE 2012](https://reader034.vdocument.in/reader034/viewer/2022051511/60048fb2c8d4ab6f9b4a65d7/html5/thumbnails/155.jpg)
Wednesday, April 11, 12
![Page 156: The CoffeeScript Edge - Chariot Solutionschariotsolutions.com/wp-content/uploads/presentations/archive/627/… · The CoffeeScript Edge Presented by Trevor Burnham at Philly ETE 2012](https://reader034.vdocument.in/reader034/viewer/2022051511/60048fb2c8d4ab6f9b4a65d7/html5/thumbnails/156.jpg)
Wednesday, April 11, 12
![Page 157: The CoffeeScript Edge - Chariot Solutionschariotsolutions.com/wp-content/uploads/presentations/archive/627/… · The CoffeeScript Edge Presented by Trevor Burnham at Philly ETE 2012](https://reader034.vdocument.in/reader034/viewer/2022051511/60048fb2c8d4ab6f9b4a65d7/html5/thumbnails/157.jpg)
Thanks! Questions?
Follow me @trevorburnham and @coffeescript
Check out my new book, Async JavaScripthttp://leanpub.com/asyncjs
Wednesday, April 11, 12