Darcy Laycock. Bridging the gap
-
Upload
svitla-systems-inc -
Category
Technology
-
view
2.023 -
download
1
Transcript of Darcy Laycock. Bridging the gap
![Page 1: Darcy Laycock. Bridging the gap](https://reader033.fdocuments.net/reader033/viewer/2022052321/554dba4eb4c905c2488b47b7/html5/thumbnails/1.jpg)
Bridging
The GAP
![Page 2: Darcy Laycock. Bridging the gap](https://reader033.fdocuments.net/reader033/viewer/2022052321/554dba4eb4c905c2488b47b7/html5/thumbnails/2.jpg)
I’m Darcy.
![Page 4: Darcy Laycock. Bridging the gap](https://reader033.fdocuments.net/reader033/viewer/2022052321/554dba4eb4c905c2488b47b7/html5/thumbnails/4.jpg)
![Page 5: Darcy Laycock. Bridging the gap](https://reader033.fdocuments.net/reader033/viewer/2022052321/554dba4eb4c905c2488b47b7/html5/thumbnails/5.jpg)
Filter Squadhttp://github.com/filtersquad
![Page 7: Darcy Laycock. Bridging the gap](https://reader033.fdocuments.net/reader033/viewer/2022052321/554dba4eb4c905c2488b47b7/html5/thumbnails/7.jpg)
cat ./README
• A brief History of JavaScript
• {Ruby,Rails} + JS Love
• Building Cool Stuff with ExecJS
![Page 8: Darcy Laycock. Bridging the gap](https://reader033.fdocuments.net/reader033/viewer/2022052321/554dba4eb4c905c2488b47b7/html5/thumbnails/8.jpg)
Most Importantly,
Becoming a Better Ruby
Developer With
JavaScript
![Page 9: Darcy Laycock. Bridging the gap](https://reader033.fdocuments.net/reader033/viewer/2022052321/554dba4eb4c905c2488b47b7/html5/thumbnails/9.jpg)
A short History of JavaScript
Act 1
![Page 10: Darcy Laycock. Bridging the gap](https://reader033.fdocuments.net/reader033/viewer/2022052321/554dba4eb4c905c2488b47b7/html5/thumbnails/10.jpg)
Created by Brendan Eich
in 1995 at Netscape
![Page 11: Darcy Laycock. Bridging the gap](https://reader033.fdocuments.net/reader033/viewer/2022052321/554dba4eb4c905c2488b47b7/html5/thumbnails/11.jpg)
Prototype Based
Dynamic & Weak Typing
Functions are First Class
![Page 12: Darcy Laycock. Bridging the gap](https://reader033.fdocuments.net/reader033/viewer/2022052321/554dba4eb4c905c2488b47b7/html5/thumbnails/12.jpg)
~1996 until ~2004
The Browser Wars &
The DHTML Years
![Page 13: Darcy Laycock. Bridging the gap](https://reader033.fdocuments.net/reader033/viewer/2022052321/554dba4eb4c905c2488b47b7/html5/thumbnails/13.jpg)
![Page 14: Darcy Laycock. Bridging the gap](https://reader033.fdocuments.net/reader033/viewer/2022052321/554dba4eb4c905c2488b47b7/html5/thumbnails/14.jpg)
~2004 until ~2008
AJAX and Web 2.0
![Page 15: Darcy Laycock. Bridging the gap](https://reader033.fdocuments.net/reader033/viewer/2022052321/554dba4eb4c905c2488b47b7/html5/thumbnails/15.jpg)
![Page 16: Darcy Laycock. Bridging the gap](https://reader033.fdocuments.net/reader033/viewer/2022052321/554dba4eb4c905c2488b47b7/html5/thumbnails/16.jpg)
~2008 to Now
HTML5 & The Return
to the Server Side
![Page 17: Darcy Laycock. Bridging the gap](https://reader033.fdocuments.net/reader033/viewer/2022052321/554dba4eb4c905c2488b47b7/html5/thumbnails/17.jpg)
0.1.0 Released Late 2009
![Page 18: Darcy Laycock. Bridging the gap](https://reader033.fdocuments.net/reader033/viewer/2022052321/554dba4eb4c905c2488b47b7/html5/thumbnails/18.jpg)
Server Side JS isn’t New.
![Page 19: Darcy Laycock. Bridging the gap](https://reader033.fdocuments.net/reader033/viewer/2022052321/554dba4eb4c905c2488b47b7/html5/thumbnails/19.jpg)
![Page 20: Darcy Laycock. Bridging the gap](https://reader033.fdocuments.net/reader033/viewer/2022052321/554dba4eb4c905c2488b47b7/html5/thumbnails/20.jpg)
1996: NetScape LiveWire
1997: Rhino created
1997: JScript via ASP
2000: JScript.NET
![Page 21: Darcy Laycock. Bridging the gap](https://reader033.fdocuments.net/reader033/viewer/2022052321/554dba4eb4c905c2488b47b7/html5/thumbnails/21.jpg)
2005: Helma released
2007: AppJet Launched
2008: Aptana Jaxer hits 1.0
2009: Node.JS Released
![Page 22: Darcy Laycock. Bridging the gap](https://reader033.fdocuments.net/reader033/viewer/2022052321/554dba4eb4c905c2488b47b7/html5/thumbnails/22.jpg)
JavaScript and I
Act 2
![Page 23: Darcy Laycock. Bridging the gap](https://reader033.fdocuments.net/reader033/viewer/2022052321/554dba4eb4c905c2488b47b7/html5/thumbnails/23.jpg)
Mid 2008:
I started writing an IRC Bot
![Page 24: Darcy Laycock. Bridging the gap](https://reader033.fdocuments.net/reader033/viewer/2022052321/554dba4eb4c905c2488b47b7/html5/thumbnails/24.jpg)
![Page 25: Darcy Laycock. Bridging the gap](https://reader033.fdocuments.net/reader033/viewer/2022052321/554dba4eb4c905c2488b47b7/html5/thumbnails/25.jpg)
Bright Idea:
JavaScript Plugins
![Page 26: Darcy Laycock. Bridging the gap](https://reader033.fdocuments.net/reader033/viewer/2022052321/554dba4eb4c905c2488b47b7/html5/thumbnails/26.jpg)
![Page 27: Darcy Laycock. Bridging the gap](https://reader033.fdocuments.net/reader033/viewer/2022052321/554dba4eb4c905c2488b47b7/html5/thumbnails/27.jpg)
Client in Ruby,
Plugins in JavaScript
![Page 28: Darcy Laycock. Bridging the gap](https://reader033.fdocuments.net/reader033/viewer/2022052321/554dba4eb4c905c2488b47b7/html5/thumbnails/28.jpg)
Early 2010:
I discovered CoffeeScript
![Page 29: Darcy Laycock. Bridging the gap](https://reader033.fdocuments.net/reader033/viewer/2022052321/554dba4eb4c905c2488b47b7/html5/thumbnails/29.jpg)
![Page 30: Darcy Laycock. Bridging the gap](https://reader033.fdocuments.net/reader033/viewer/2022052321/554dba4eb4c905c2488b47b7/html5/thumbnails/30.jpg)
![Page 31: Darcy Laycock. Bridging the gap](https://reader033.fdocuments.net/reader033/viewer/2022052321/554dba4eb4c905c2488b47b7/html5/thumbnails/31.jpg)
![Page 32: Darcy Laycock. Bridging the gap](https://reader033.fdocuments.net/reader033/viewer/2022052321/554dba4eb4c905c2488b47b7/html5/thumbnails/32.jpg)
“Simple, transparent CoffeeScript support
for Rails and Rack Apps”.
![Page 33: Darcy Laycock. Bridging the gap](https://reader033.fdocuments.net/reader033/viewer/2022052321/554dba4eb4c905c2488b47b7/html5/thumbnails/33.jpg)
The Gap
Act 3
![Page 34: Darcy Laycock. Bridging the gap](https://reader033.fdocuments.net/reader033/viewer/2022052321/554dba4eb4c905c2488b47b7/html5/thumbnails/34.jpg)
![Page 35: Darcy Laycock. Bridging the gap](https://reader033.fdocuments.net/reader033/viewer/2022052321/554dba4eb4c905c2488b47b7/html5/thumbnails/35.jpg)
Ruby JavaScript
![Page 36: Darcy Laycock. Bridging the gap](https://reader033.fdocuments.net/reader033/viewer/2022052321/554dba4eb4c905c2488b47b7/html5/thumbnails/36.jpg)
Ruby JavaScript
![Page 37: Darcy Laycock. Bridging the gap](https://reader033.fdocuments.net/reader033/viewer/2022052321/554dba4eb4c905c2488b47b7/html5/thumbnails/37.jpg)
Ruby JavaScriptBridgingThe Gap
![Page 38: Darcy Laycock. Bridging the gap](https://reader033.fdocuments.net/reader033/viewer/2022052321/554dba4eb4c905c2488b47b7/html5/thumbnails/38.jpg)
Client Side
Act 4
![Page 39: Darcy Laycock. Bridging the gap](https://reader033.fdocuments.net/reader033/viewer/2022052321/554dba4eb4c905c2488b47b7/html5/thumbnails/39.jpg)
RJS
![Page 40: Darcy Laycock. Bridging the gap](https://reader033.fdocuments.net/reader033/viewer/2022052321/554dba4eb4c905c2488b47b7/html5/thumbnails/40.jpg)
![Page 41: Darcy Laycock. Bridging the gap](https://reader033.fdocuments.net/reader033/viewer/2022052321/554dba4eb4c905c2488b47b7/html5/thumbnails/41.jpg)
Red + RedShifthttps://github.com/jessesielaff/red/
![Page 42: Darcy Laycock. Bridging the gap](https://reader033.fdocuments.net/reader033/viewer/2022052321/554dba4eb4c905c2488b47b7/html5/thumbnails/42.jpg)
![Page 44: Darcy Laycock. Bridging the gap](https://reader033.fdocuments.net/reader033/viewer/2022052321/554dba4eb4c905c2488b47b7/html5/thumbnails/44.jpg)
![Page 45: Darcy Laycock. Bridging the gap](https://reader033.fdocuments.net/reader033/viewer/2022052321/554dba4eb4c905c2488b47b7/html5/thumbnails/45.jpg)
RKellyhttp://bit.ly/9nLw4R
![Page 46: Darcy Laycock. Bridging the gap](https://reader033.fdocuments.net/reader033/viewer/2022052321/554dba4eb4c905c2488b47b7/html5/thumbnails/46.jpg)
![Page 47: Darcy Laycock. Bridging the gap](https://reader033.fdocuments.net/reader033/viewer/2022052321/554dba4eb4c905c2488b47b7/html5/thumbnails/47.jpg)
Unobtrusive RJS(Rails >= 3.0),
e.g. https://github.com/rails/jquery-ujs
![Page 48: Darcy Laycock. Bridging the gap](https://reader033.fdocuments.net/reader033/viewer/2022052321/554dba4eb4c905c2488b47b7/html5/thumbnails/48.jpg)
![Page 49: Darcy Laycock. Bridging the gap](https://reader033.fdocuments.net/reader033/viewer/2022052321/554dba4eb4c905c2488b47b7/html5/thumbnails/49.jpg)
CoffeeScript
![Page 50: Darcy Laycock. Bridging the gap](https://reader033.fdocuments.net/reader033/viewer/2022052321/554dba4eb4c905c2488b47b7/html5/thumbnails/50.jpg)
![Page 52: Darcy Laycock. Bridging the gap](https://reader033.fdocuments.net/reader033/viewer/2022052321/554dba4eb4c905c2488b47b7/html5/thumbnails/52.jpg)
![Page 53: Darcy Laycock. Bridging the gap](https://reader033.fdocuments.net/reader033/viewer/2022052321/554dba4eb4c905c2488b47b7/html5/thumbnails/53.jpg)
Rails 3.1 Asset Pipeline
![Page 54: Darcy Laycock. Bridging the gap](https://reader033.fdocuments.net/reader033/viewer/2022052321/554dba4eb4c905c2488b47b7/html5/thumbnails/54.jpg)
HandleBar / Mustache
![Page 55: Darcy Laycock. Bridging the gap](https://reader033.fdocuments.net/reader033/viewer/2022052321/554dba4eb4c905c2488b47b7/html5/thumbnails/55.jpg)
Same template Code on Client & Server
![Page 56: Darcy Laycock. Bridging the gap](https://reader033.fdocuments.net/reader033/viewer/2022052321/554dba4eb4c905c2488b47b7/html5/thumbnails/56.jpg)
Server Side
Act 5
![Page 57: Darcy Laycock. Bridging the gap](https://reader033.fdocuments.net/reader033/viewer/2022052321/554dba4eb4c905c2488b47b7/html5/thumbnails/57.jpg)
gem install coffee-script
![Page 58: Darcy Laycock. Bridging the gap](https://reader033.fdocuments.net/reader033/viewer/2022052321/554dba4eb4c905c2488b47b7/html5/thumbnails/58.jpg)
0.1.0 until 0.3.2
Ruby-based Compiler
![Page 59: Darcy Laycock. Bridging the gap](https://reader033.fdocuments.net/reader033/viewer/2022052321/554dba4eb4c905c2488b47b7/html5/thumbnails/59.jpg)
Barista + BistroCar
Call Library via Node
![Page 60: Darcy Laycock. Bridging the gap](https://reader033.fdocuments.net/reader033/viewer/2022052321/554dba4eb4c905c2488b47b7/html5/thumbnails/60.jpg)
Gem Version ~> 1.0
Uses the gem ‘node’
![Page 61: Darcy Laycock. Bridging the gap](https://reader033.fdocuments.net/reader033/viewer/2022052321/554dba4eb4c905c2488b47b7/html5/thumbnails/61.jpg)
Gem Version <= 2.2, >= 2.0
Built in Engines Approach
![Page 62: Darcy Laycock. Bridging the gap](https://reader033.fdocuments.net/reader033/viewer/2022052321/554dba4eb4c905c2488b47b7/html5/thumbnails/62.jpg)
Gem Version ~> 2.2
Uses ExecJS instead
![Page 63: Darcy Laycock. Bridging the gap](https://reader033.fdocuments.net/reader033/viewer/2022052321/554dba4eb4c905c2488b47b7/html5/thumbnails/63.jpg)
Baristahttps://github.com/sutto/barista/
![Page 64: Darcy Laycock. Bridging the gap](https://reader033.fdocuments.net/reader033/viewer/2022052321/554dba4eb4c905c2488b47b7/html5/thumbnails/64.jpg)
ExecJShttps://github.com/sstephenson/execjs
![Page 65: Darcy Laycock. Bridging the gap](https://reader033.fdocuments.net/reader033/viewer/2022052321/554dba4eb4c905c2488b47b7/html5/thumbnails/65.jpg)
therubyracer
therubyrhino
johnson
mustang
![Page 66: Darcy Laycock. Bridging the gap](https://reader033.fdocuments.net/reader033/viewer/2022052321/554dba4eb4c905c2488b47b7/html5/thumbnails/66.jpg)
Apple JavaScript Core (JSC)
Mozilla Spidermonkey
Microsoft Windows Script Host
Node.js
![Page 67: Darcy Laycock. Bridging the gap](https://reader033.fdocuments.net/reader033/viewer/2022052321/554dba4eb4c905c2488b47b7/html5/thumbnails/67.jpg)
Uses first available RunTime
![Page 68: Darcy Laycock. Bridging the gap](https://reader033.fdocuments.net/reader033/viewer/2022052321/554dba4eb4c905c2488b47b7/html5/thumbnails/68.jpg)
Uglifierhttps://github.com/lautis/uglifier
![Page 69: Darcy Laycock. Bridging the gap](https://reader033.fdocuments.net/reader033/viewer/2022052321/554dba4eb4c905c2488b47b7/html5/thumbnails/69.jpg)
![Page 70: Darcy Laycock. Bridging the gap](https://reader033.fdocuments.net/reader033/viewer/2022052321/554dba4eb4c905c2488b47b7/html5/thumbnails/70.jpg)
Rails 3.1 Asset Pipeline
![Page 71: Darcy Laycock. Bridging the gap](https://reader033.fdocuments.net/reader033/viewer/2022052321/554dba4eb4c905c2488b47b7/html5/thumbnails/71.jpg)
![Page 72: Darcy Laycock. Bridging the gap](https://reader033.fdocuments.net/reader033/viewer/2022052321/554dba4eb4c905c2488b47b7/html5/thumbnails/72.jpg)
Building Stuff with ExecJS
![Page 73: Darcy Laycock. Bridging the gap](https://reader033.fdocuments.net/reader033/viewer/2022052321/554dba4eb4c905c2488b47b7/html5/thumbnails/73.jpg)
![Page 74: Darcy Laycock. Bridging the gap](https://reader033.fdocuments.net/reader033/viewer/2022052321/554dba4eb4c905c2488b47b7/html5/thumbnails/74.jpg)
![Page 75: Darcy Laycock. Bridging the gap](https://reader033.fdocuments.net/reader033/viewer/2022052321/554dba4eb4c905c2488b47b7/html5/thumbnails/75.jpg)
![Page 76: Darcy Laycock. Bridging the gap](https://reader033.fdocuments.net/reader033/viewer/2022052321/554dba4eb4c905c2488b47b7/html5/thumbnails/76.jpg)
RedJShttps://github.com/cowboyd/redjs
![Page 77: Darcy Laycock. Bridging the gap](https://reader033.fdocuments.net/reader033/viewer/2022052321/554dba4eb4c905c2488b47b7/html5/thumbnails/77.jpg)
“Rspecs for a Ruby interface to javascript.”
![Page 78: Darcy Laycock. Bridging the gap](https://reader033.fdocuments.net/reader033/viewer/2022052321/554dba4eb4c905c2488b47b7/html5/thumbnails/78.jpg)
Embedding vs.
Just Running Code
![Page 79: Darcy Laycock. Bridging the gap](https://reader033.fdocuments.net/reader033/viewer/2022052321/554dba4eb4c905c2488b47b7/html5/thumbnails/79.jpg)
![Page 80: Darcy Laycock. Bridging the gap](https://reader033.fdocuments.net/reader033/viewer/2022052321/554dba4eb4c905c2488b47b7/html5/thumbnails/80.jpg)
![Page 81: Darcy Laycock. Bridging the gap](https://reader033.fdocuments.net/reader033/viewer/2022052321/554dba4eb4c905c2488b47b7/html5/thumbnails/81.jpg)
More Traditional Approaches
![Page 82: Darcy Laycock. Bridging the gap](https://reader033.fdocuments.net/reader033/viewer/2022052321/554dba4eb4c905c2488b47b7/html5/thumbnails/82.jpg)
Juggernaut 2https://github.com/maccman/juggernaut
![Page 83: Darcy Laycock. Bridging the gap](https://reader033.fdocuments.net/reader033/viewer/2022052321/554dba4eb4c905c2488b47b7/html5/thumbnails/83.jpg)
![Page 84: Darcy Laycock. Bridging the gap](https://reader033.fdocuments.net/reader033/viewer/2022052321/554dba4eb4c905c2488b47b7/html5/thumbnails/84.jpg)
Ruby / Other Languages
Redis PubSub
Node.JS Server
Browser
![Page 85: Darcy Laycock. Bridging the gap](https://reader033.fdocuments.net/reader033/viewer/2022052321/554dba4eb4c905c2488b47b7/html5/thumbnails/85.jpg)
Ruby / Other Languages
Redis PubSub
Node.JS Server
Browser
![Page 86: Darcy Laycock. Bridging the gap](https://reader033.fdocuments.net/reader033/viewer/2022052321/554dba4eb4c905c2488b47b7/html5/thumbnails/86.jpg)
Ruby / Other Languages
Redis PubSub
Node.JS Server
Browser
![Page 87: Darcy Laycock. Bridging the gap](https://reader033.fdocuments.net/reader033/viewer/2022052321/554dba4eb4c905c2488b47b7/html5/thumbnails/87.jpg)
Ruby / Other Languages
Redis PubSub
Node.JS Server
Browser
![Page 88: Darcy Laycock. Bridging the gap](https://reader033.fdocuments.net/reader033/viewer/2022052321/554dba4eb4c905c2488b47b7/html5/thumbnails/88.jpg)
See Also: ZeroMQ
![Page 89: Darcy Laycock. Bridging the gap](https://reader033.fdocuments.net/reader033/viewer/2022052321/554dba4eb4c905c2488b47b7/html5/thumbnails/89.jpg)
Conclusion
![Page 90: Darcy Laycock. Bridging the gap](https://reader033.fdocuments.net/reader033/viewer/2022052321/554dba4eb4c905c2488b47b7/html5/thumbnails/90.jpg)
Thanks!
![Page 91: Darcy Laycock. Bridging the gap](https://reader033.fdocuments.net/reader033/viewer/2022052321/554dba4eb4c905c2488b47b7/html5/thumbnails/91.jpg)
Questions?