Node at artsy
-
Upload
craig-spaeth -
Category
Technology
-
view
2.766 -
download
0
Transcript of Node at artsy
e Story
» Started off typical Rails MVC» Evolving into a ick-Client app using Rails MVC + API + Backbone.js» Our main repo is growing into a giant beast... lets decouple into separate Node Apps
MODEL API NODE PROXY BACKBONE.JS
Wednesday, December 7, 2011
Why Node?
» Because it’s cool.
New Kids on the Block circa 1980-something
Wednesday, December 7, 2011
Why Node?
» Because it’s cool.» It’s plenty lightweight for a thin-server + thick-client structure» It #t’s nicely as a proxy server being non-blocking and all» Languages that can be used on the client and server (Javascript, Coffeescript, Jade, Haml.js, etc.)» Lots of great tools for client-side development and testing» Heroku already supports it
Wednesday, December 7, 2011
How Art.sy Uses Node (As a Server)
» Authenticates with Art.sy’s API» Stores access token in session» Serves up the initial page» Acts as a proxy server to our API
Wednesday, December 7, 2011
How Art.sy Uses Node (As a Dev. Environment)
» CoffeescriptPrettier version of Javascript
» JadeFeature rich template engine for the client and server
» Stylus & NibStylesheets made awesome
PRE-PROCESSORS
Wednesday, December 7, 2011
How Art.sy Uses Node (As a Dev. Environment)PRE-PROCESSORS
Coffeescript
Wednesday, December 7, 2011
How Art.sy Uses Node (As a Dev. Environment)PRE-PROCESSORS
Jade
Wednesday, December 7, 2011
How Art.sy Uses Node (As a Dev. Environment)PRE-PROCESSORS
Stylus
Wednesday, December 7, 2011
How Art.sy Uses Node (As a Dev. Environment)
» Compiles assets on page refresh in development & pushes to a CDN in production» .gitignore directory where assets are compiled» Coffeescript & Jade on the client & server» It’s like you wouldn’t even know Javascript/HTML/CSS existed ;)
PRE-PROCESSORS
Wednesday, December 7, 2011
How Art.sy Uses Node (As a Dev. Environment)
» Test server-side & client-side javascript using Jasmine-node» Independently test client-side models without a browser
TESTING
Wednesday, December 7, 2011
How Art.sy Uses Node (As a Dev. Environment)
» Zombie.js = super fast & painless acceptance tests» Easily mock API responses with a simple node server
TESTING
Wednesday, December 7, 2011
Setting Up Node for Production
» Heroku for hosting» Amazon CDN for assets» Cake tasks & Jenkins for Continuous Integration
Wednesday, December 7, 2011