Closing the bridge

Please note: This article is only available in English.
JavaScript is the most popular scripting language around, while C# is (in my opinion) the most elegant language. Time to bring the two together.

JavaScript started its life in the browser, however, nowadays you find it in Adobe's programs (Acrobat, Photoshop, ...), on servers and even on traditional desktop programs. Lately I released a library that represents a valid HTML5 parser and DOM generator - entirely written in C#.

Now we have two sides: Our classic C# program world, where we can read out webpages to represent the static state, and the modern web world, where everything basically comes from the dynamics given in form of JavaScript code. How nice would it be to bring the two together? This does not mean taking a simple V8 .NET wrapper (which already exists), but directly (written in C#) compiling JavaScript to IL? The main advantage of this would be, that JavaScript could talk directly (!) to .NET and vice versa.

This post does not present a current solution, but is meant to announce that last week I spent some hours in trying to implement this - and I think I came quite far. Actually some parts still need to implemented, others need to be polished. As a proof-of-concept project this already does its job. But since I am always aiming for a near-perfect (or at least presentable) solution, it should be obvious that it's not ready for release.

So when will the bridge between JavaScript and C# be closed? The answer is: Shortly. My plan is to release AngleScript (working name) in sometime in August.

It is important to note that AngleScript will be not just a simple IL translator or something similar, i.e. it already executes the given JavaScript code as well. While projects like JSIL convert C# (or any .NET / IL program) to JavaScript code (!), this project represents a parser and IL compiler for JavaScript. It is therefore similar to V8, with the difference that everything will be managed.

Created .

References

Sharing is caring!