cassis.js: Code That Runs in both JS & PHP - Natively

*
Proposal
Short Form
Advanced

Excerpt

This talk is about how I use language hacks to run the same code natively on PHP and Javascript (JS), which I call CASSIS for Client And Server Scripting Implementation Subset.

I'll describe how I discovered CASSIS, how to use the open source library cassis.js to write middleware logic once for both client & server, and real-world use cases including where I've successfully deployed cassis.js for years (even as an essential part of my own site tantek.com).

Description

This talk is about how I use language hacks* to run the same code natively on PHP and Javascript (JS), which I call CASSIS for Client And Server Scripting Implementation Subset.

Like any modern web developer, I want my site to work whether or not Javascript (JS) is supported, e.g. search engines which don’t execute it, on older browsers where users have disabled it, or perhaps most frequently, on mobile browsers with slow and unreliable network access that simply fails to load it. Tired of writing my code twice (once for JS, once for PHP), I started tinkering to see if there was a way to write code that would run in either simultaneously (without translation).

In this talk l’ll describe how I discovered CASSIS, how to use the open source library cassis.js to write middleware logic (math, datetime computations, string processing, parsing) once for both client & server, and real-world use cases including where I’ve successfully deployed cassis.js for years (even as an essential part of my own site tantek.com).

*You might be familiar with a previous language hack of mine: Box Model Hack

Tags

cassis, javascript, php, language, functionalprogramming, logic, middleware

Speaking experience

I've spoken at OSBridge, various O'Reilly conferences, BarCamps, SXSW, and more. See http://lanyrd.com/profile/t/past/speaking/ for a fairly complete speaking history.

Speaker