Reusing your frontend JS on the server with The Ruby Racer and/or Ruby Rhino - Kenneth Kalmer

Writing modern web applications requires a ton of JS, and somewhere in that JS lies some application logic (we're not just talking DOM manipulations here). If you require that same logic on the server-side for say, generating reports, what do you do? I'll show you how ValuationUP.com pushes the single responsibility principle to the max by "embedding" V8 into our report generation code so the same JS that powers our Backbone.js frontend powers our PDF's generated by Prawn. Thin wrappers, no duplication, practical IoC, ultimate SRP.
Length: 24:24
Views 482 Likes: 5
Recorded on 2013-02-07 at Rubyfuza
Look for other videos at Rubyfuza.
Tweet this video