TECHNOLOGY PREVIEW OF ALTERNET STUDIO FOR JAVASCRIPT/TYPESCRIPT

We are constantly looking at improving our products to empower .NET developers with tools for including scripting capabilities in their applications. These tools include a powerful code editor for editing user scripts, a script execution and debugging engine, and a visual form designer to hook up custom user interfaces to these scripts.

Extensibility Studio utilizes all the power that Microsoft compiler technologies provide and allows integration of full-featured C# and Visual Basic scripts into .NET applications.

There are known pitfalls that come with this power; in a nutshell, it's difficult to seamlessly integrate debugger functionality in the same application which runs C#/Visual Basic scripts in it, as a debugger and a process being debugged need to be separate processes. Please refer to the following article for more information about workarounds to these problems: NET Script debugging limitations.

Based on feedback from our customers, we understood that for some of them, it's essential to support script execution in the application context and allow seamless integration of script debugging logic in the same application. And if we cannot support both with .NET scripting, we need to look for alternative solutions.

JavaScript/TypeScript as an alternative to C#/Visual Basic

We discovered that the V8 JavaScript engine, an integral part of the Chrome browser, could satisfy both requirements. It can access any .NET object defined in .NET Framework assemblies or in the application itself and allows the incorporation of debugging logic into the same application.

We decided to take a step further and support TypeScript, a super-set of JavaScript which adds optional strict type-checking, helping to avoid painful bugs people commonly run into when writing JavaScript by type-checking user code. We experimented with TypeScript compiler API to ensure we can provide a code editing experience comparable to one in Visual Studio.NET or Visual Studio Code.

As a result of this research, we built a proof-of-concept prototype that shows how JavaScript code can be edited, executed, and debugged. Please have a look at the demo project here:

ExtensibilityStudio.JS.Demo.zip

The below screenshots demonstrate JavaScript execution and debugging:

circle.png
 
In-application debugging of JavaScript code

In the following months, we will continue working on this project and plan to extend all products included in the Extensibility Studio for code editing, script execution and debugging, and visual interface designing, with the support of JavaScript/TypeScript as a scripting language.

We want to give .NET developers the ability to use all the features that Extensibility Studio provides with a choice between C#/Visual Basic and JavaScript/TypeScript programming languages.

Stay tuned for further updates, or feel free to leave your feedback below or contact me directly at andrew.medvedev@alternetsoft.com

Previous
Previous

INTEGRATING SCRIPT DEBUGGER INTO YOUR APPLICATION

Next
Next

KNOWN ISSUES OF .NET SCRIPT EXECUTING AND DEBUGGING