JScript .NET

JScript .NET
Paradigm multi-paradigm
Developer Microsoft Corporation
Typing discipline duck, weak, dynamic
Platform .NET Framework
Influenced by
JScript / ECMAScript
JScript .NET
Filename extension .js

JScript .NET is a .NET programming language developed by Microsoft.

The primary differences between JScript and JScript .NET can be summarized as follows:

Firstly, JScript is a scripting language, and as such programs (or more suggestively, scripts) can be executed without the need to compile the code first. This is not the case with the JScript .NET command-line compiler, since this next-generation version relies on the .NET Common Language Runtime (CLR) for execution, which requires that the code be compiled to Common Intermediate Language (CIL), formerly called Microsoft Intermediate Language (MSIL), code before it can be run. Nevertheless, JScript .NET still provides full support for interpreting code at runtime (e.g., via the Function constructor or the eval function) and indeed the interpreter can be exposed by custom applications hosting the JScript .NET engine via the VSA interfaces.

Secondly, JScript has a strong foundation in Microsoft's ActiveX/COM technologies, and relies primarily on ActiveX components to provide much of its functionality (including database access via ADO, file handling, etc.), whereas JScript .NET uses the .NET Framework to provide equivalent functionality. For backwards-compatibility (or for where no .NET equivalent library exists), JScript .NET still provides full access to ActiveX objects via .NET / COM interop using both the ActiveXObject constructor and the standard methods of the .NET Type class.

Although the .NET Framework and .NET languages such as C# and Visual Basic .NET have seen widespread adoption, JScript .NET has never received much attention, by the media or by developers. It is not supported in Microsoft's premier development tool, Visual Studio .NET. However, ASP.NET supports JScript .NET.

Language differences

The following are prime examples of language differences between JScript .NET and other .NET languages, including comparisons.

Differences with C#

Differences with C++

e.g.:

import System;

Console.WriteLine("Hello, what's your name?");
Console.WriteLine("Type your name: ");

var _name = Console.ReadLine();

Console.WriteLine("Hello, " + _name);

Differences with Java

Differences with older versions of JScript

See also

Notes

    References

    This article is issued from Wikipedia - version of the 5/8/2016. The text is available under the Creative Commons Attribution/Share Alike but additional terms may apply for the media files.