Silverlight has a more natural support of JavaScript.

It was interesting to read this article around Flash, HTML and AJAX.

It talked about the various ways in which the Adobe Flash is struggling to compete with AJAX in the RIA space. In fact, some of our early research showed that AJAX was associated with RIA, and not Flash, despite Adobe's best efforts to claim the ownership behind the acronym.

The article mentioned various pieces to the Silverlight discussion, which to me wasn't enough. In that with Silverlight enabling JavaScript interoperability is more seamless and natural than Flash has ever as been.


Well you have to take a hard look at Flash.  In order to merge both Flash and AJAX solutions together, there is a degree of compromise: if you wish to allow JavaScript to get deeper access to assets within the closed binary, you first have to write a method or two via the ExternalInterface API. This is like poking holes in the runtime for JavaScript to access.

Example, Ryan Stewart @ Adobe was quoted:

We need to bring Flash and HTML/Ajax closer together. You absolutely should be able to reach inside of the Flash Player as a JavaScript developer and pull out some of the good bits that make the Flash experience so great. We shouldn’t force the “1 pixel SWF” or a sand-boxed Flex application.

Inside Silverlight, we've empowered JavaScript folks to have a more natural amount of access to the content within (without any extra proxy code API's). This can be done via our HtmlWindow Class within Silverlight itself or if you're looking to access the content from JavaScript, it's simple a matter of using the below:


From the .Content onwards, you now have full access to the Silverlight solution as if you were accessing the content from within C#, IronJava, IronRuby etc.

This again, illustrates how committed we are to ensuring Silverlight is an open cross-platform, cross-browser and cross-device solution for your next bet. As opposed to a closed binary format which has restrictions implied such as the External Interface API.

We don't see AJAX as competition (in fact, Outlook Web Access was one of the first AJAX applications ever built), it's more of a complimentary extension (Silverlight v1 was released with JavaScript first, before C#) than a competitor and we've made a lot of efforts around our ASP.NET AJAX Control Toolkit to ensure that it's being proven. You don't need ASP.NET to use the Control Toolkit either, as the source code is freely available for other dynamic languages to make use of.

Further, if .NET isn't your cup of tea, that's fine you can add your own dynamic language support to Silverlight, via the DLR such as the OpenSource Project that is currently working on enabling Client-Side PHP to work ontop of the DLR.