Share via


Difference between JScript, JScript.NET and Managed JScript

There are three different types of JScript engines that MS currently offers to the users. In this blog I would like to discuss more about the differences between them and would go into the reasoning for three different types sometime later.

JScript (or native JScript)

Read the intro about this in my previous blog here. The native JScript engine relies primarily on Microsoft's ActiveX/COM to provide much of its functionality. The core engine (jscript.dll) is installed as a Windows/IE component on a user machine and resides in “ % SystemRoot%\system32” directory.

JScript.NET

JScript .NET is the next generation of an implementation by Microsoft of the ECMA 262 language. Combining the feature set of previous versions of JScript with the best features of class-based languages, JScript .NET includes the best of both worlds. The JScript.NET engine relies primarily on the .NET Framework to provide much of its functionality and runs on the Common Language Runtime.

Differences in JScript .NET when compared to (native) JScript include true compiled code (as it is converted to MSIL format for the CLR), typed and typeless variables, late- and early-binding, classes (with inheritance, function overloading, property accessors, and more), packages, cross-language support, and full access to the .NET Framework.

Being a part of the .NET Framework, JScript .NET’s core engine Microsoft.JScript.dll is installed at “ % SystemRoot%\Microsoft.NET\Framework\vX.XXXXX” . The X.XXXXX specifies the .NET Framework version which is installed. Based on the .NET Framework version that is shipped/installed, the language is at times referred to as version 1.0/1.1/2.0 correspondingly. Also, the language at times is versioned based on Visual Studio’s major version it shipped with – like 8.0 for Visual studio 2005 with which .NET Framework 2.0 was shipped. So JScript.NET-2.0 and JScript.NET-8.0 both refer to the same version.

Managed JScript

Managed JScript is the name that is used for the implementation of the ECMA-262 language over the Dynamic Language Runtime to be delivered by Silverlight. It is the latest addition to the JScript family and was released in MIX07.

Unlike JScript .NET which is less dynamic than the original JScript but provides CLS compatibility, Managed JScript is designed on top of the DLR and provides the features needed for scripting scenarios. Implementation over DLR enables Managed JScript code to works well with not only C#, but also with IronPython , IronRuby, VB among other languages. The Managed JScript engine is installed by Silverlight 1.1 at “%ProgramFiles%\Microsoft Silverlight\Microsoft.JScript.Runtime.dll”.

The official release of Managed JScript is planned as a part of Microsoft Silverlight 1.1 (the Alpha Refresh release of the same can be downloaded from here) and next versions of ASP.NET. You can get more information about the same from the official Silverlight website here.

Hope this should get some clarity of the different types of JScript offerings from Microsoft. I would follow up with more on JScript soon.

Comments

  • Anonymous
    August 16, 2007
    PingBack from http://msdnrss.thecoderblogs.com/2007/08/16/difference-between-jscript-jscriptnet-and-managed-jscript/

  • Anonymous
    September 06, 2007
    Looking for documentation regarding the different flavors of JScript and not sure which one is correct.

  • Anonymous
    September 06, 2007
    Being a late entrant into the group, I always had questions regarding what’s what of JScript - Managed

  • Anonymous
    September 20, 2007
    Excellent explanation. Ricky.

  • Anonymous
    February 04, 2008
    You did not mention about javascript. what is difference between jscript, jscript.net while comparing javascript.

  • Anonymous
    February 22, 2008
    当前MS提供给用户三种不同的JScript Engine,在这篇文章中我们将讨论他们之间的不同,和他们不同的动机.

  • Anonymous
    February 13, 2009
    [Nacsa Sándor, 2009. január 20. – február 12.] Komplett fejlesztő környezet Windows kliens és web alkalmazások