Connector links Ruby programs with .NET environment

By Jack Vaughan

Ruby on Rails has become a popular framework for building Web apps at the same time Ruby itself has become a popular dynamic language. Ruby interest straddles both the Java and .NET worlds - but as greater numbers of Java and Ruby developers get into the Ruby development, more and more will miss familiar programming tools and methods.  How widely Ruby will expand may rest on how much Ruby program building can resemble Java or .NET program building methods – or the extent to which/how much Ruby programs, bits, and pieces can interoperate with Java and .NET programs.

Sapphire Steel Software has jumped into the Ruby fray with a its Ruby In Steel IDE and associated tools, but it has worked to broaden Ruby adoption by offering a JRuby In Steel product for the Java-inclined, and, more recently, the Ruby Connector, which allows Visual Studio developers to work with the standard Ruby interpreter.

Shock to the system
For Visual Studio developers, the initial Ruby experience may be something of a rude awakening said, Huw Collingbourne, technical director, Sapphire Steel.

“The big shock to the system if you are used to Visual Studio is that the Ruby interpreter is entirely command line,” said Collingbourne.

“That means that there is no drag and drop. That means no Forms design, and none of those interactive front-end features that are second nature to Visual Studio users,” he continued.

So what we decided to do in order to support the Ruby interpreter that people are using today was to provide a drag and drop control that would let .NET languages communicate with a running Ruby program. [Editor’s note: Microsoft at this writing is at work on a Ruby interpreter associated with its announced IronRuby .NET CLR project.]

Collingbourne said the Ruby Connector will allow people to create a visual front-end in a .NET language that will run simultaneously with a Ruby program. The result: Interop freaks can have .NET programs and Ruby programs running at the same time, sharing data, wich can be displayed in a form.

How did this idea arise? “Because we were working on the interpreter, we had to provide deep integration. We had to create links to the Ruby interpreter so people can communicate,” said Collingbourne. Beside an IDE, Sapphire Steel has created a fast visual debugger and other tools for Ruby.

Don’t give me dynamic
Collingbourne’s crew has had to build some serious intelligence into the Ruby Connector.

He said: “The data that is sent back from Ruby has certain problems from a .NET perspective. The data [for the dynamic language] does not have a strict type. It may be inferred. So each item of data is not fixed as in C#.”

“Ruby Connector,” said Collingbourne , “can send back data to a .NET language program which would not normally makes sense to the  program. The Ruby Connector will provide information on the type of data received [to .NET],” he said.

Related
The Ruby Connector Manual - www.sapphiresteel.com
Example of JRuby inside Ruby In Steel - www.sapphiresteel.com
Ruby In Steel user guide for download - - www.sapphiresteel.com


Leave a Reply