You are reading a MIX Online Opinion. In which we speak our minds. Hans Hugli Meet Hans Arrow

Opinions

0Comment Retweet

Introducing Gestalt 1.0 and the Gestalt Widget Pack

Nov 20, 2009 In News By Hans Hugli

A few months ago, we released Gestalt beta as a MIX Online lab.  Gestalt began as an exploration—a way to bring Ruby and Python to the web browser.  Today, we’re delighted to announce that Gestalt has been updated to version 1.0. It’s now part of IronRuby 1.0 and IronPython. 

The IronRuby team has made a number of much-needed improvements to Gestalt. In addition these changes, we’re releasing a handful of widgets that we built using Gestalt.

Learn more about them, here.

What is Gestalt?

Gestalt allows you to write web applications in Ruby or Python + XAML in your HTML pages. There’s no need for a compiler. You can use your favorite text editor to create DLR Gestalt applications from a Mac or PC. Gestalt applications run cross-browser, so it’s a "write once, run anywhere" client solution for writing Rich Internet Applications (RIA.) 

Learn more about the philosophy behind Gestalt in Joshua’s post, or find out more about Gestalt here.

What’s new in Gestalt 1.0? Gestalt Beta — plus more!

  • Supports bundling of Ruby and Python files using each language’s convention.  You can now (for example) package and run Rails on your client!
  • Allows you to dynamically load assemblies (only downloads what you need)
  • Integrated with the Dynamic Language Runtime
  • Simplified and streamlined model for creating Gestalt apps.  No jQuery dependency.
  • Support for remote references to Gestalt
  • Visual Studio debugging support
  • A browser console for debugging and manipulating Gestalt
  • Rich error reporting
  • Built-in support for loading external assemblies and content -    Support for running multiple instances of Gestalt on the same page

 

image 

Screenshot of the Gestalt Video Widget

How do I get started? Let’s write a simple app

The syntax behind Gestalt has changed slightly to increase its flexibility. Here is the most basic application one could write with Gestalt—it would simply pop an alert.

<html>
   <head>
   <script src="http://mschnlnine.vo.llnwd.net/d1/dlr-20091120.js"
      type="text/javascript"></script>
   </head>
   <body>
   <script type="text/python">
      window.Alert("Hello world")
   </script>
   </body>
</html>

If you would like to add UI, simply add some XAML in a <script> tag marked with an “id” that has the same name as the “class” of the Python or Ruby script you want associated with it. This application will present a 70px x 50px canvas with the words “hello world” written on it.

<html>
   <head>
   <script src="http://mschnlnine.vo.llnwd.net/d1/dlr-20091120.js"
      type="text/javascript"></script>
   </head>
   <body>
   <script type="text/python" class="canvas1">
      me.textBlock1.Text = "Hello World"
   </script>
   <script type="application/xml+xaml"
      id="canvas1" width="70" height="50">
      <Canvas x:Name="canvas1"
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      Background="Red" Width="70" Height="50">
         <TextBlock x:Name="textBlock1"/>
      </Canvas>
   </script>
   </body>
</html>

(Note that the permanent URL to the DLR.js will change to a friendlier name. Follow us on Twitter to hear about changes as they happen.)

You have to run both these samples off a web server, but you don’t need to download any files to your web server. When working with more complex files that depend on external XAML files, you should have a local copy of the DLR binaries on your server. But for simple apps that don’t have any external dependencies, this method is sufficient.

And there you have it. Visit http://visitmix.com/labs/gestalt to download the latest version of the DLR and Widgets. We hope you’ll be impressed and give Gestalt a spin.

If you create a Widget,let us know—we’ll link to it or place it in our Library. And if you find Gestalt useful on your site,shout it out and we will add a link. Let us know what you think by leaving a comment. If you tweet, follow us on Twitter to learn about new content, opinions and articles.