Athens Ruby Meetup #3: IronRuby

24
The .Net Ruby VM Dec 2009 Nikos Dimitrakopoulos

Transcript of Athens Ruby Meetup #3: IronRuby

Page 1: Athens Ruby Meetup #3: IronRuby

The .Net Ruby VM

Dec 2009Nikos Dimitrakopoulos

Page 2: Athens Ruby Meetup #3: IronRuby

Me

Software developer Ruby lover Rails developer (for fun & profit) Working at pamediakopes.gr

and thus also .Net developer

Page 3: Athens Ruby Meetup #3: IronRuby

The presentation

What is IronRuby What does it offer to Ruby

developers Limitations Future

Page 4: Athens Ruby Meetup #3: IronRuby

Famous quotes

It doesn’t scale It’s slow It’s immature Not enterprise …

Page 5: Athens Ruby Meetup #3: IronRuby

But

jRuby MacRuby Rubinius MagLev IronRuby

Page 6: Athens Ruby Meetup #3: IronRuby
Page 7: Athens Ruby Meetup #3: IronRuby

.Net

Page 8: Athens Ruby Meetup #3: IronRuby

What is IronRuby

The Ruby VM implemented in .Net (C#)

Part of the family of the scripting (and not only) languages implemented in .Net Python Ruby (more coming)?

Page 9: Athens Ruby Meetup #3: IronRuby

.Net Integration

Interoperability with .Net Consume all the C# code you want!

The huge .Net library ecosystem External .Net libraries Custom / existing C# code

Page 10: Athens Ruby Meetup #3: IronRuby

# Demo

Page 11: Athens Ruby Meetup #3: IronRuby

.Net Integration

Extend existing .Net classes the ruby way!

Page 12: Athens Ruby Meetup #3: IronRuby

.Net Integration

Call ruby code from .Net!

Page 13: Athens Ruby Meetup #3: IronRuby

# Demo

Page 14: Athens Ruby Meetup #3: IronRuby

.Net Integration

Deploy on .Net infrastructure Web apps on IIS (Rails on .Net!) Consume (natively) .Net services

SQL Office Active Directory Exchange etc...

Page 15: Athens Ruby Meetup #3: IronRuby

.Net Integration

Deploy on .Net infrastructure Desktop applications on Windows Desktop applications on everywhere

(Mono)

Page 16: Athens Ruby Meetup #3: IronRuby

.Net Integration

Test .Net code with Cucumber & RSpec!

Page 17: Athens Ruby Meetup #3: IronRuby

Additionally

“Translations” of idioms: object.SomeMethod() <->

object.some_method System.Core <-> System::Core

C# lambdas and delegates <-> Ruby clojures

>>> l = System::Byte.instance_methods(false).last=> 'get_type_code'

>>> l.ruby_name=> "get_type_code"

>>> l.clr_name=> "GetTypeCode"

Page 18: Athens Ruby Meetup #3: IronRuby

Additionally

Interoperability with the other scripting languages! Python JavaScript …

Use code also from there!

Page 19: Athens Ruby Meetup #3: IronRuby

Silverlight

Silverlight integration Write ruby instead of javascript in

your pages! (Gestalt project)

Page 20: Athens Ruby Meetup #3: IronRuby

Silverlight

Page 21: Athens Ruby Meetup #3: IronRuby

# Gestalt Demo

Page 22: Athens Ruby Meetup #3: IronRuby

Limitations

No support for native C gems Some rough edges in interoperability

Page 23: Athens Ruby Meetup #3: IronRuby

Status

Page 24: Athens Ruby Meetup #3: IronRuby

Links

IronRuby: http://ironruby.net/ http://ironruby.codeplex.com/

Rubyst.es http://rubyst.es http://groups.google.com/ruby-hellug

Pamediakopes http://www.pamediakopes.gr http://www.airtickets24.com

Me http://blog.nikosd.com http://twitter.com/nikosd nospam - at - nikosd - dom – com

Code samples : http://nikosd.com/f/ironruby-code-samples.zip