Freigeben über


IronRuby

This is the first in a series of guest posts on a variety of topics for MSDN Flash feature articles. I want to thank all the people who’ve submitted ideas, abstracts and articles (I am working my way through them – honest) and in particular Shay Friedman, the author of this first article for today’s MSDN Flash.

If you have an idea for a feature article do either contact me via Twitter (@MikeOrmond) or send me an email (Mike dot Ormond at Microsoft dot com). With that, I’ll hand over to Shay…

“Ruby is a popular dynamic programming language (12th most popular programming language today according to the Tiobe Index). The great thing about it, which has also made it the success it is today, is that it is fun to work with. The code turns out simple and clear, the built-in syntax is very powerful and in general, you get things done faster. Moreover, the Ruby ecosystem is amazing – there are tons of free open-source libraries and tools out there that you can instantly use and dozens of forums, mailing lists, chat rooms and blogs packed with content and people who're willing to help.

In the last few years, Microsoft has been developing an implementation of the Ruby language on top of the .NET Framework – IronRuby. Its expertise is the integration between Ruby code and .NET code – it enables using .NET objects from Ruby code and vice versa.

This might not sound as a big deal at first but as soon as you dig into it you discover that both worlds, the .NET world and the Ruby world, are now connected. And this is nothing but outstanding – a whole new world of opportunities opens up right in front of you.

Fortunately, you don't have to start using IronRuby as your primary programming language to benefit from it. Instead, there are various everyday tasks where IronRuby and the Ruby ecosystem can help you improve:

· Quick code checks – IronRuby features an interactive console. This console allows you to write code and get an immediate feedback. No need to compile, no need to decorate with classes and namespaces – just write the code you need and hit Enter.

· Writing proof-of-concepts – IronRuby features a permissive yet very powerful syntax which enables developers to get things done faster. This makes IronRuby a perfect language to write "quick and dirty" applications like POCs.

· Providing extensibility capabilities – the DLR features a very simple way to run IronRuby code from C# or VB.NET. You can take advantage of that and provide extensibility capabilities to your applications using IronRuby scripts.

· Testing .NET code – Ruby has several different testing frameworks, including some very innovative ones like RSpec and Cucumber. IronRuby's seamless integration with .NET code enables you to take advantage of these frameworks to test your static .NET language code.

· Building – Ruby offers a powerful, clean and intuitive task system named rake. This system can be used as a build system (instead of MSBuild or NANT). I recommend using a rake extension named albacore which features .NET-related tasks.

· More – anything you can think of. The entire Ruby language is there for you and nothing stops you. Like anything in the Ruby world? Use it within your .NET world with IronRuby.

In conclusion, this article introduced you to only a few of the numerous new possibilities that IronRuby brings to .NET developers. Even as a tool, you can still take advantage of its capabilities and become a more productive and happier developer.

A great place to get start is my post “Starting Using IronRuby in 25 Minutes”. So log on to https://IronRuby.net, download IronRuby and start partying!”

-------------

clip_image002Shay Friedman is a Microsoft Visual C#/IronRuby MVP and the author of IronRuby Unleashed. You can read his blog at https://IronShay.com and contact him via his Twitter account - @ironshay.

Comments

  • Anonymous
    August 11, 2010
    You mention Cucumber but I've spent ages trying to get it to work on IronRuby and it simply doesn't work - the igem installer for Gherkin (a dependency) seems to install some old version that Cucumber doesn't like, so it won't install.

  • Anonymous
    August 11, 2010
    Interesting timing for this article, just as the IronRuby team has dispanded after getting no love from MS

  • Anonymous
    August 11, 2010
    I also spent ages trying to make some gems to work on IronRuby. And the help from Ruby community looks like "Oh, you are on Windows - You are on your own, dude"

  • Anonymous
    August 15, 2010
    The latest version of Cucumber really had some strange problems. Just install the previous version and everything will work smoothly. Regarding problems with gems, just post your questions/problems to the IronRuby mailing list and we'd be glad to help - http://bit.ly/IronRubyML.