Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ


Choose your language

InfoQ Homepage News Embed Python, Ruby, and XAML directly into your HTML with Gestalt

Embed Python, Ruby, and XAML directly into your HTML with Gestalt

This item in japanese

JavaScript is a language that is showing its age. A lot of developers now prefer to work with languages like Ruby or Python, falling back on JavaScript only for the browser. Sure there were attempts to support other languages in the browser like VBScript, but they never really took off.

Meanwhile, HTML is a rather poor languages for interactive applications. Sure there are Scalable Vector Graphics, but without support in Internet Explorer they are just as useless as VBScript. This has lead to the domination of component technologies like Flash, which are referenced by HTML but not used within it.

Gestalt is a JavaScript library that changes all that. Combined with Silverlight, Gestalt allows web developers to directly embed Python and Ruby code in their HTML. When you view the source of a site, you will see something very familiar:

<script language="python">

That, and an include at the top of the page, is all you need to start writing your code in Python. The include file pipes the inline Python or Ruby code to the Silverlight runtime, which leverages the Dynamic Language Runtime.

Gestalt, which is still just a demo, also allows you to embed XAML directly into the HTML. The XAML code is wrapped in an XML tag with the class attribute set to “xaml”.

According to Harry Pierson of Microsoft, this model of directly embedding Silverlight-compatible code in HTML is the eventual goal of the IronPython and IronRuby projects.

Rate this Article