Join  |  Sign in
Technology preview of Extensibility Studio for Javascript/Typescript

We’re constantly looking at how to improve our products to empower .NET developers with a set of tools for including scripting capabilities in their applications. These tools include powerful code editor for editing user scripts, 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 integrating full-featured C# and Visual Basic scripts into .NET applications.

There are known pitfalls that come with this power, in a nut-shell 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 a feedback received from our customers we came to understanding 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 start looking for alternative solutions.

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

We discovered that V8 JavaScript engine which is an integral part of Chrome browser can satisfy both requirements: it can access any .NET objects, either defined in .NET Framework assemblies or in the application itself, and allows a debugging logic to be incorporated 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 make sure we can provide a code editing experience comparable with 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:


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'd like to give .NET developers an 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

Comments (2)

  • Ajay Soni

    Awesome work! I look forward for PoC to evolve. Will your team also provide TS/JS intellisense support in the editor too?

  • Andrew Medvedev

    Yes, this demo is already using alpha version of TypeScript parser based on TypeScript API, and all features like color highlighting, outlining, code formatting, intellisense and syntax errors underlying are implemented through these API.

Leave a comment