This post is part of the “MIX10 – Pumping Iron on the web” series:
- Part 1 - Introduction
- Part 2.1 – Server-side web development with dynamic languages
- Part 2.2 – Client-side web development with dynamic languages
- Part 3 - Using scripting in static applications
- Coming soon: Part 4 - Web-app extensibility with scripts
The original post was mistakenly removed, so it’s been reposted with the original post date, 4/26/2010. Sorry if this confuses your blog readers or causes any other inconvenience.
IronRuby and IronPython are fully-supported in the browser, thanks to Silverlight. In-fact, they are hands-down the simplest way to develop a Silverlight application. This is not only because of how expressive the programming languages are; the integration with Silverlight doesn't fight how the web works.
For example, here's an entire Silverlight app which just writes a message into the HTML page, written in Python:
DLR-based Silverlight applications let you write HTML script-tags in other languages than JavaScript, but in a way that works cross-browser and cross-platform; the languages work in Moonlight on Linux as well.
Both inline and script-src tags are supported, so your scripts can be separated from the HTML file:
This integration makes writing Silverlight applications just as easy as they were in Silverlight 1, but with the power of .NET and Ruby or Python. DLR-based applications also support a XAP model for anyone familiar with how static Silverlight applications work, so you get to choose which way you prefer to write your applications.
All the specific examples used in this section of the talk were taken from these posts:
- Python in the browser: my blog post from PyCon 2010 about IronPython in Silverlight
- Ruby in the browser: my article in RubyInside about IronRuby in Silverlight
- Silverlight.net / dynamic languages: tons of info on getting started with Python, Ruby, and the DLR in Silverlight.
Next up, using dynamic languages in your existing web-applications.