Main Content

Javascript and Friends: Scripting Ruby with JavaScript for Fun and Profit

About the Talk

May 6, 2010 6:15 AM

Oklahoma City, Oklahoma

Oklahoma City, Oklahoma

When it comes to creating a host environment on browser or server alike, there is no language quite like JavaScript. From its dead simple object model to its lack of a standard library, it’s obvious that it’s been designed from day one let some other language do the heavy lifting. Conventionally, this other language has been C or Java, but why mess with those when you can use a real heavy hitter like Ruby? Using the V8 JavaScript extension for Ruby we’ll use these two dynamic languages in concert to * Define a domain specific language with javascript that can be interpreted by both the browser and by your Ruby code on the server. * Implement a simulated browser environment in Ruby which can be used for headless testing of Javascript code. (Hint, this is perfect for continous integration servers) * Allow callers to extend your web service at runtime with eval-safe javascript functions implemented in Ruby The discussion framed by these examples will show why having a JavaScript interpreter in your Ruby runtime is a such a valuable tool, and why its usefulness will only grow in the future.

Ratings and Recommendations

Avg. Rating

Average based
on 8 ratings

comments powered by Disqus