BT

Draft DLR Hosting Spec Released

by Jonathan Allen on Jan 31, 2008 |

An updated draft of the DLR Hosting Spec has been released. This document covers hosting DLR-based languages with a focus on Silverlight, MerlinWeb, and interactive consoles. As it is just a draft, many of the developer notes explaining what they are trying to accomplish are still present.

The scenarios Microsoft is trying to support include:

  • SilverLight hosting in browsers
  • MerlinWeb on the server
  • Interaction consoles where the ScriptRuntime is possibly isolated in another app domain.
  • Editing tool with colorization, completion, and parameter tips (may only work on live objects in v1)
  • PowerShell, C#, and VB.NET code using dynamic objects and operating on them dynamically in the same app domain

Three levels of hosting are defined in the spec. Their introductions are quoted below:

Level One -- Script Runtimes, Scopes, and Executing Files and Snippets

For simple application programmability, you want to provide a host object model that dynamic language code can use. You then want to execute files of code that consume that object model. You may also want to get the values of variables from the dynamic language code to use dynamic functions as command implementations or event handlers.

Level Two -- Engines, Compiled Code, Sources, and Object Operations

The next level of engagement involves operating directly with engines and abstractions of source code and compiled code. You can compile code and run it in any scope or its default scope. You also have more control over how you provide sources to the DLR.

Level Three -- Full Control, Remoting, Tool Support, and More

Level three engagement as a host gives you full control over the ScriptRuntime. There are many things hosts can do at this level from controlling runtime configuration, to handling runtime exceptions, to using remote ScriptRuntimes, to providing full programming tool support with completion, parameter info pop-ups, and colorization.

The balance of the spec is the API definition itself and quite a few code samples. You can get the DLR Hosting Spec from John Lam's blog.

Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Tell us what you think

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread
Community comments

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Discuss

Educational Content

General Feedback
Bugs
Advertising
Editorial
InfoQ.com and all content copyright © 2006-2014 C4Media Inc. InfoQ.com hosted at Contegix, the best ISP we've ever worked with.
Privacy policy
BT