Inside IronJS: Behind the JavaScript to .NET Project

Fredrik Holmstrom, the creator of the IronJS implementation of the JavaScript application development language on .NET, talks to eWEEK about the origins of his project and where he would like to take it.

IronJS is an open-source project working to deliver an implementation of the popular JavaScript Web development language to the Microsoft .NET Framework. Fredrik Holmstrom, a programmer in Gothenburg, Sweden, created IronJS as part of a larger project he is building out. Holmstrom said he uses C# and JavaScript for his professional work, and a mix of F#, Python and Clojure for his "hobby" work. With support for dynamic languages such as Python and Ruby being a popular topic among developers, Holmstrom spoke with eWEEK Senior Editor Darryl K. Taft about his project.

How did you come up with the concept for IronJS?

Basically the idea sprung up over a year back when I started playing around with CouchDB and realized how much JavaScript actually is in use today-both on the client and server parts of the Web. But the core business logic was never written in JavaScript-which creates a sort of mismatch between the client/server/database and results in a lot of duplicate functionality and an (often homegrown [or] project-specific) way to communicate between the server and client. And this is done with some arbitrary specified JSON [JavaScript Object Notation], usually.

I really saw an opportunity here to build something that would allow you to run JavaScript on the server, still have access to a big base library and use the same language as the client. I started researching into the subject several times during the last year, but I always got sidetracked. However, about three weeks ago I really set my mind on actually getting it done. I downloaded the DLR [Microsoft Dynamic Language Runtime] sources from CodePlex and started hacking, first following the tutorial language (called SymPL) to get a feel for how the DLR works. Then I dug into the IronRuby source code (which is a bit more manageable than the IronPython source, which is insanely huge) to get a really good feel of how to implement a language on top of the DLR.

All in all, it's taken me about three weeks to get to the current state of IronJS, which is a real testament to how awesome a piece of technology the DLR actually is.

How far along are you in terms of putting it out as a 0.1 release?

The current main branch on GitHub is usable, but barely (which I've labeled as 0.1-alpha). A somewhat usable 0.1 release is about three to four weeks away, I would say.

Is IronJS open source?

Yes, it is. It's released under the GNU General Public License v3.

What's your day job?

My day job is at CP+B Europe ( which is the European branch of Crispin Porter + Bogusky ( I work as a .NET developer doing mostly back-end stuff for various Websites.

I see where you said all your professional work is done in C# and JavaScript. What do you work on primarily?

As I stated previously, I do mostly back-end stuff for our various clients; [it] ranges from small ad campaigns to full-blown six-month, full-time projects. My professional work has shifted from C# [and] JavaScript to mostly C# with some PHP for good measure.

Why the varied mix of F#, Python and Clojure for your hobby work?

This is a hard one. I would say that this is mostly about the fact that I enjoy using programming languages that teach me something other than their syntax-F# has its roots in OCaml and ML, which preaches a specific way of functional programming. Clojure is a Lisp [derivative], as you might know, and the s-expressions are a very nice way to express some problems. Python just happened to be a really nice mix between C, Lisp and scripting.

Other than IronJS, what other hobby work are you involved in?

At the moment I have two projects that are on hiatus, they are actually just waiting for IronJS to get to a stable enough state that I can start basing the scripting functionality of them on the IronJS run-time-this is also one of the main forces behind my motivation to build IronJS, I really needed a JavaScript run-time on .NET that fulfilled three main goals, to be: one, free and open source; two, fast; [and] three, actively developed.

And after searching for a month or so I gave up trying to find one and decided to teach myself the DLR and write my own. I'm still a bit secretive about my two other projects, but they will be publicly available on GitHub once the time comes.