Gestalt README

Gestalt is a cross-browser, cross-platform library built on the Dynamic Language Runtime that you can use in your web pages to enable Ruby, Python, and XAML directly in your HTML markup.

What's Included in this ZIP package?

+- dlr/
| +- DLR.js  - reference this script from your web pages to enable gestalt
| +- DLR.xap    - used if you are mixing ruby and python in the same page
| +- IronRuby.slvx  - used if you have ruby on the page
| +- IronPython.slvx  - used if you have python on the page
| +- Microsoft.Scripting.slvx  - used by both Ruby and Python
| +- gestaltmedia.js  - enables Gestalt to play back HTML5 video and audio tag content
+- samples/   - place to unzip individual samples downloaded from the samples page
  +- getting.started/    - very basic samples that you can view and modify to get started

Downloading additional samples

When you download individual samples and widgets from the samples page, just unzip them directly into the samples folder. so that each sample will be in a new subfolder beneath the samples folder.

Use our fast, hosted version (Recommended)

While this package contains the Gestalt library files and binaries, we recommend that you use the version we've hosted for you on our servers. One simple line in your head tag is all it takes for you to start building Gestalt applications:

<script type="text/javascript" src="http://www.visitmix.com/dlr/dlr.js"></script>

If you prefer hosting the library on your own web server or on your local development server, continue reading.

Hosting the files

To launch any of the samples, you will need to place the "DLR" and "Samples" folder on the root of a web server and load the html pages in your favorite web browser. You can place the DLR and Samples directory in different directories, but you may need to modify path information. When exposing the DLR folder through a local Apache or IIS instance. You may need to configure MIME-types for .slvx, .py, and .rb files (detailed instructions follow in the next section).

- For .slvx files set the MIME-type to: application/octet-stream
- For .rb and py files set the MIME-type to: text/plain

Adding Gestalt MIME-types to your web server

Your web server needs to know how to handle the Gestalt application mime-types. Follow the instructions below for IIS (PC) or Apache (Mac).

IIS

  1. Launch the inetmgr tool from the start run menu.
  2. Click the top level node in the left hand tree control.
  3. Double-click on the "MIME types" Icon in the main window.
  4. Right-click anywhere in the main window and choose “add”.
  5. Type .slvx in the "File Extension Name" field.
  6. Type application/octet-stream in the "MIME type” field.
  7. Do the same for .rb and .py files using the mime-type: text/plain
  8. It may require stopping and restarting the web server for the MIME type to take effect.
  9. Browse to the Gestalt file through the localhost.

Apache (on Mac OSX v10.6.1 assuming admin privileges)

  1. Open Terminal by typing "Terminal" in Finder and hitting enter.
  2. Open the Apache mime.types file in your favorite text editor. We use the following command for TextMate:
    mate /private/etc/apache2/mime.types
  3. Search for application/octet-stream. At the end of the line, add a space and then type slvx.
  4. Search for text/plain. At the end of the line, add a space and then type rb. Add another space and then type py.
  5. Save the mime.types file. You may need to restart your server (Uncheck and then check System Preferences > Sharing > Web Sharing).
  6. Browse to the Gestalt file through the localhost.