What is the Silverlight Dynamic Languages SDK?

The Silverlight Dynamic Languages SDK enables developers to use dynamic languages running on the Dynamic Language Runtime (DLR) to build Silverlight applications. The DLR enables dynamic languages to interoperate with .NET's rich libraries and with each other. For example, developers can call managed JScript from IronPython. It includes services to build new languages on top of the DLR, such as a shared, dynamic type system and a language hosting model. Lastly, it makes it easy to host dynamic languages inside of different hosts. Silverlight, for example, is simply an application host used to host the DLR.

Please note that the Silverlight™ Dynamic Languages SDK is Beta 1.

Get the Silverlight Dynamic Languages SDK

To write Silverlight applications in Ruby, Python and JScript, download the Silverlight Dynamic Languages SDK, which includes:

  • IronPython, IronRuby, and Managed JScript language libraries
  • Chiron, a dynamic language development utility
  • source code for IronPython, IronRuby, the Dynamic Language Runtime (DLR), and Chiron
  • sample applications for both Ruby and Python
  • batch file used to run sample on Windows
  • shell script to run applications on Mac
  • Microsoft® Public License (Ms-PL)

You also need Silverlight 2 Beta 1. You can download it and other resources, such as the Silverlight 2 SDK, from the Get Started page.

Samples

The following samples use IronPython, IronRuby, and the Silverlight Dynamic Languages SDK. Note Silverlight 2 Beta 1 is required for these samples.

DLRConsole

DLRConsole is the ultimate example of Silverlight dynamic languages. It’s written in Python, but gives you a console for Python, Ruby, and Jscript, allowing you to see how your code affects the on-screen Canvas. It's essentially the best "Try DLR" example we have and it can be extremely useful when you’re writing Silverlight applications.

Clock

Clock is a simple Silverlight application uses XAML and a dynamic script to set the start time. We wrote the sample in IronRuby and IronPython.

RubyFlickr

Rubyflickr is a Ruby application that searches flickr for images and displays them using Lightbox. It illustrates how Ruby and JavaScript interact in the browser.

Learn

Use these resources to start learning about dynamic languages with Silverlight.

Talks

  • DLRConsole in Action (8 minutes, 28 seconds) - Jimmy Schementi shows how dynamic languages can be used to interact with Silverlight by writing Ruby and JScript code right in the browser.
  • Silverlight & Dynamic Languages (70 minutes, 28 seconds) - Jimmy Schementi and John Lam explain how the Dynamic Language Runtime (DLR) works in Silverlight. It includes an introduction to Silverlight for Python and Ruby programmers.
  • Just Glue It! Ruby & the Dynamic Language Runtime (DLR) In Silverlight (72 minutes, 26 seconds) - Jim Hugunin explains how to rapidly create an application that combines code from multiple dynamic languages.

Walkthroughs

Documentation

Blogs

  • John Lam is responsible for IronRuby, the Ruby implementation in Silverlight.
  • Jimmy Schementi is responsible for making DLR languages work in Silverlight. He writes mostly Silverlight, UI design, and Rails.
  • Harry Pierson is responsible for IronPython.
Contribute
  • IronRuby is the implementation of Ruby that runs on the Dynamic Language Runtime (DLR). The RubyForge project is here and the primary mailing list is here.
  • IronPython is the implementation of Python that runs on the Dynamic Language Runtime (DLR). The CodePlex project is here and the primary mailing list is here.
  • Silverlight Dynamic Languages SDK is the CodePlex project for the Silverlight Dynamic Languages SDK. Please post submissions to the project’s Discussions tab.