- Posted by Shay Friedman on September 26, 2009
I had the honor to be the first speaker of the cross language talks in altnet London group.
I really had a great time – the people were great, the MRM office was awesome (even though Kevin might think otherwise :) ) and most of the demos worked smoothly. Microsoft organized Pizzas and beer and the atmosphere was just incredible. Special thanks for Seb, Neil and MRM for making this happen.
And there was a talk too! I talked about Ruby, IronRuby, Cucumber and Ruby on Rails. I really tried to bring some real-world demos that you can take with you and implement right away. Hopefully, you will.
If you have any questions, requests, comments, notes or whatever don’t hesitate to contact me.
So, to those who came and to those who didn’t make it, here are the slides and demo files:
Some pics from the event (click to open a higher resolution version):
Talking… pegs, cucumbers…
When you drink and present, you get huge exceptions…
Audience! Thanks for coming!
At the end of the session with Neil:
Hope you enjoyed it as much as I did,
Shay.
- Posted by Shay Friedman on September 22, 2009
Announcement! Announcement! Announcement!
I’m coming to London this Friday and I’m going to do a session about IronRuby on the AltNetCrossGroup!

The session will take place in MRM London (76 Southwark Street) on Friday, September 25th, between 18:30 and 20:30.
The agenda is:
- Introduction to the Ruby language
- IronRuby – using CLR objects from IronRuby and using IronRuby from C#
- Cucumber – test your code with style
- Ruby on Rails
This is the current plan. If you have ideas or requests, please let me know (via the contact page or twitter)!
Register here: http://altnetcrosstalks.eventbrite.com/
If you’re interested, make sure to register ASAP since the amount of seats is limited.
I am very excited to be the first speaker on the AltNetGroup series of cross language talks and I hope to see you there!
Shay.
- Posted by Shay Friedman on September 9, 2009
When I was playing around with Silverlight and IronRuby, I ran into a problem with data binding and IronRuby objects. This post is to let you know about it and hand you the workaround as well.
The Problem
You have an IronRuby class. You fill it with data and set it as the data context of your Silverlight element.
The result: the values are not presented on the Silverlight page.
Detailed steps to reproduce:
1. Create an IronRuby class. For example:
class Person
attr_accessor :full_name
def initialize(full_name)
self.full_name = full_name
end
end
2. Create an instance of that class and set it as the data_context of an element:
shay = Person.new "Shay Friedman"
@root.data_context = shay
3. Set the element to present the data:
<StackPanel>
<TextBlock>You name is </TextBlock>
<TextBlock Text="{Binding full_name}"/>
</StackPanel>
4. Run the page – nothing is shown.
The Reason
With the help of Jimmy Schementi I’ve figured out what the problem was. Silverlight 3.0 elements can only do reflection-based data binding. IronRuby objects are based on ICustomTypeDesciptor, which means that the attributes cannot be read using reflection. Bummer.
The Workaround
Instead of using an IronRuby class, use a CLR class. This means that in order to make it work, the work flow should be as follows:
1. Create a C#/VB.Net class. For example (assume this appears in “person.dll”):
class Person
{
public string FullName { get; set; }
public Person(string fullName)
{
FullName = fullName;
}
}
2. Create an instance of that class in IronRuby and set it as the data_context of an element:
require "person.dll"
shay = Person.new("Shay Friedman")
@root.data_context = shay
3. Set the element to present the data:
<StackPanel>
<TextBlock>You name is </TextBlock>
<TextBlock Text="{Binding FullName}"/>
</StackPanel>
4. Run the page – everything works as expected.
All the best,
Shay.