Integrating Ruby and .Net with IronRuby

Using dynamic languages, like Ruby, in conversion with static language frameworks, like .Net, is one of the hot topics in town. No wonder .Net developers are putting a lot of effort in the development of the DLR, the Dynamic Language Runtime, which will run on top of their CLR, the Common Language Runtime. This will give us the capability to enrich the vast framework capabilities of .Net with the dynamic features provided by Ruby.

At XAOP we recently did tests with both the DLR and IronRuby (an Open Source implementation of the Ruby programming language for .NET), to get both Ruby and .Net united in a single application. This gives us tons of new possibilities, since the .Net class library is already so extensive for creating both Windows based and Web based applications (just to name a few).

Ever since the Microsoft .Net framework came out, it has proven to be a worthy opponent of Sun's Java framework. Its greatest advantages being the choice of programming language it gives you (with C# .Net, VB .Net and C++ .Net as most popular ones) on the one hand and its enormous API capabilities on the other. The class library already was very extensive from the first version of the framework on and has only grown ever since. With the included Visual Studio development environment Rapid Application Development (RAD) becomes possible for all kinds of applications, whether you are developing for the Web or for the desktop. Further more the framework gives you the capability of extending and integrating with other Microsoft products, like Office, Windows Server, SQL Server, SharePoint Server, ... just to name a few. The popularity of the framework also makes support easily available.

The core of the .Net framework lies with the Common language Runtime, or CLR, which can load compiled executable files and provide them with a runtime that provides features like type checking and garbage collection (you can see it as Microsoft's version of the Java Virtual Machine as you will). On top of this developers at Microsoft have build the DLR or Dynamic Language Runtime. This will bring dynamic features to .Net and already provides support for Python (under the name of IronPython) and Ruby (under the name of IronRuby). This latter language, of course being the language of our choice at XAOP.

Recently we tested out these new dynamic features in a small application, and this in two directions. First we tried to get some IronRuby code run within a .Net application. Which we were able to do quite easily by utilizing the API provided by the IronRuby framework. After this initial test we even tried to go the other way around by adding some new dynamic functionality to an existing .Net application after compilation. This as well worked out just fine. In fact, it turns out existing .Net libraries can be easily added to (or required in) IronRuby programs, giving you tons of new possibilities. To check these possibilities out even further, we are now in the process of writing some small test applications. One of them will integrate our existing document migration solutions in a SharePoint environment. Another one will automate the reading and writing of customized Office documents.

If you would like to try out some of these dynamic features yourself, we soon will be publishing some sample code to our github repository.

Leave a comment



  • (required, but not published)


Entries per category

  1. 6 pages are tagged with docpublisher
  2. 4 pages are tagged with documentum
  3. 11 pages are tagged with events
  4. 12 pages are tagged with rails
  5. 24 pages are tagged with ruby