SlideShare una empresa de Scribd logo
1 de 69
Descargar para leer sin conexión
+                   +

   =

        IronRuby for the
         .NET Developer
Cory Foy - Cory Foy, LLC
foyc@coryfoy.com - @cory_foy
Hello, IronRuby!
History

Ruby and .NET

  Ruby to .NET

  Ruby CLR Project

  RubyCLR

All attempted to run Ruby on top of the CLR
History

 CLR 2.0

  (.NET 3.0 and 3.5 were still CLR 2.0)

  No dynamic dispatch

  Everything had to be compiled

  Lots of magic, and shims
History

 CLR 2.0

  (.NET 3.0 and 3.5 were still CLR 2.0)

  No dynamic dispatch

  Everything had to be compiled

  Lots of magic, and shims

    CREDIT: HTTP://WWW.FLICKR.COM/PHOTOS/37341680@N04/4278580062
History
alias alias_method_missing method_missing

def method_missing(name, *params)
   alias_method_missing(name, *params)
      unless name == :Count
   create_ruby_instance_method(self.class, 'Count') do
      include 'System.Collections'
      ldarg_2
      call     'static Marshal::ToClrObject(VALUE)'
      call     'ArrayList::get_Count()'
      call     'static Marshal::ToRubyNumber(Int32)'
      ret
   end
   self.Count
end
History
 CLR 4.0

  Dynamic keyword (C#)
History
 CLR 4.0

  Dynamic keyword (C#)

Calculator calc = GetCalculator();
int sum = calc.Add(1, 3);
History
 CLR 4.0

  Dynamic keyword (C#)

var calc = GetCalculator();
int sum = calc.Add(1, 3);
History
 CLR 4.0

  Dynamic keyword (C#)
object calc = GetCalculator();
Type calcType = calc.GetType();
object res =
calcType.InvokeMember("Add",
    BindingFlags.InvokeMethod, null,
    new object[] { 10, 20 });
int sum = Convert.ToInt32(res);
History
 CLR 4.0

  Dynamic keyword (C#)

dynamic calc = GetCalculator();
int sum = calc.Add(1, 3);
History
 DLR

  Introduced in 2007

  Set of libraries to assist language developers

  Still runs on the CLI, and can access the CLR

  Standardizes the implementation of dynamic
  languages on the CLI/CLR
History
IronRuby

 John Lam hired by Microsoft in 2006

 Announced in 2007 at MIX7

 Goal to make Ruby a first-class citizen

 Completely rewritten to take advantage of the
 DLR
History
 DLR

       Dynamic Language Runtime (DLR)




       Common Language Runtime (CLR)
History
 DLR

          Dynamic Language Runtime (DLR)

   Common
 Hosting Model




         Common Language Runtime (CLR)
History
 DLR

          Dynamic Language Runtime (DLR)

   Common
                     Runtime
 Hosting Model




         Common Language Runtime (CLR)
History
 DLR

          Dynamic Language Runtime (DLR)

   Common                            Language
                     Runtime
 Hosting Model                     Implementation




         Common Language Runtime (CLR)
History

                                Ruby




              Dynamic Language Runtime




      Common Language Runtime
History

                                Ruby




              Dynamic Language Runtime




      Common Language Runtime
History

                                    Ruby


     VB
C#                Dynamic Language Runtime




          Common Language Runtime
History

                                    Ruby


     VB
C#                Dynamic Language Runtime




          Common Language Runtime
History

                                    Ruby


     VB
C#                Dynamic Language Runtime




          Common Language Runtime
History

                                    Ruby


     VB
C#                Dynamic Language Runtime




          Common Language Runtime
History

                                    Ruby


     VB
C#                Dynamic Language Runtime




          Common Language Runtime
History

                                    Ruby


     VB
C#                Dynamic Language Runtime




          Common Language Runtime
History

                                    Ruby


     VB
C#                Dynamic Language Runtime




          Common Language Runtime
IronRuby for the .NET Developer
WHY RUBY?
RUBY IS LOVE!
CREDIT: HTTP://WWW.FLICKR.COM/
                                                  PHOTOS/19684903@N00/317182464




CREDIT: HTTP://WWW.FLICKR.COM/
 PHOTOS/WWWORKS/3800306463
                                 RUBY IS LOVE!


                                                        CREDIT: HTTP://WWW.FLICKR.COM/
                                                      PHOTOS/STUCKINCUSTOMS/2366980580


                CREDIT: HTTP://WWW.FLICKR.COM/
              PHOTOS/EXPRESSMONORAIL/2631659122
CREDIT: HTTP://WWW.FLICKR.COM/PHOTOS/BILLBURRIS/2822607830
IronRuby for the .NET Developer
TYPE SAFETY
                                    CODE SAFETY


                  OBJECT GRAPHS

    DEBUGGING
                        STATIC CODE ANALYSIS


                SEALED TYPES
INTELLISENSE
                             COMPILER CATCHES ERRORS
TYPE SAFETY
                                    CODE SAFETY


                  OBJECT GRAPHS

    DEBUGGING
                        STATIC CODE ANALYSIS


                SEALED TYPES
INTELLISENSE
                             COMPILER CATCHES ERRORS
IronRuby for the .NET Developer
TEST
ALL
THE
FRICKIN’
TIME
CREDIT: HTTP://WWW.FLICKR.COM/PHOTOS/FATBOYKE/2668411239
Metaprogramming
                                   CREDIT: HTTP://WWW.FLICKR.COM/
                                   PHOTOS/CHOCONANCY/2470073711




All Classes Are Open

Definitions are active

All method calls have a receiver

Classes are objects
WHAT IS THIS?
AND WHY IS IT HERE?
WHAT IS THIS?
AND WHY IS IT HERE?
WHAT IS THIS?
AND WHY IS IT HERE?
WHAT IS THIS?
AND WHY IS IT HERE?
Duck Typing
Open Classes

               CREDIT: HTTP://COMMONS.WIKIMEDIA.ORG/WIKI/
                         FILE:NEON_OPEN_SIGN.JPG
Monkey Patching
method_missing

                 CREDIT: HTTP://WWW.FLICKR.COM/
                   PHOTOS/TAITOH/3029653729/
Dynamism
           CREDIT: HTTP://WWW.FLICKR.COM/PHOTOS/
                    LABGUEST/3510995344/
RubyGems

Standardized Packaging System

Central Repository for hosting packages

Allows for installation and management of
multiple installed versions
RubyGems
RubyGems


    THAT’S IT!
IronRuby Basics
IronRuby Basics

Installing
IronRuby Basics

Installing

  http://ironruby.net/Download
IronRuby Basics

Installing

  http://ironruby.net/Download

  Download Windows Installer
IronRuby Basics

Installing

  http://ironruby.net/Download

  Download Windows Installer

  ???
IronRuby Basics

Installing

  http://ironruby.net/Download

  Download Windows Installer

  ???

  Profit!!!
IronRuby Basics
IronRuby Basics
..and what did we just install?
IronRuby Basics
..and what did we just install?

  bin - IronRuby executables (ir.exe, etc)
IronRuby Basics
..and what did we just install?

  bin - IronRuby executables (ir.exe, etc)

  lib - Helpers for including assemblies and other
  common tasks
IronRuby Basics
..and what did we just install?

  bin - IronRuby executables (ir.exe, etc)

  lib - Helpers for including assemblies and other
  common tasks

  samples - Contains the Tutorial app and others
IronRuby Basics
..and what did we just install?

  bin - IronRuby executables (ir.exe, etc)

  lib - Helpers for including assemblies and other
  common tasks

  samples - Contains the Tutorial app and others

  silverlight - Contains the Silverlight Dynamic
  Languages SDK
IronRuby Basics
..and, how the heck did it just do that?

            Dynamic Language Runtime (DLR)

     Common                            Language
                       Runtime
   Hosting Model                     Implementation




           Common Language Runtime (CLR)
IronRuby Basics
..and, how the heck did it just do that?

                       Runtime

     Call sites        Binders             Rules




            Common Language Runtime (CLR)
IronRuby Basics
..and, how the heck did it just do that?

                 Language Implementation

                        Language
       ASTs                                Compiler
                         Context




              Common Language Runtime (CLR)
IronRuby Basics
..and, how the heck did it just do that?

                Common Hosting Model

 ScriptRuntime ScriptEngine ScriptScope    ScriptSource




           Common Language Runtime (CLR)
Integration

Calling .NET from IronRuby

Calling IronRuby from .NET

WinForms / WPF / Silverlight

Cucumber / RSpec
Get Involved!
Website - http://ironruby.net

  http://ironruby.codeplex.com/

  http://github.com/ironruby

Mailing List - http://rubyforge.org/mailman/listinfo/
ironruby-core

foyc@coryfoy.com | @cory_foy
Slides @ http://blog.coryfoy.com
IronRuby for the .NET Developer

Más contenido relacionado

La actualidad más candente

Ruby Presentation
Ruby Presentation Ruby Presentation
Ruby Presentation platico_dev
 
Using Aspects for Language Portability (SCAM 2010)
Using Aspects for Language Portability (SCAM 2010)Using Aspects for Language Portability (SCAM 2010)
Using Aspects for Language Portability (SCAM 2010)lennartkats
 
Extending Ruby using C++
Extending Ruby using C++Extending Ruby using C++
Extending Ruby using C++Tristan Penman
 
Go Programming Language by Google
Go Programming Language by GoogleGo Programming Language by Google
Go Programming Language by GoogleUttam Gandhi
 
Pharo Arm Status
Pharo Arm StatusPharo Arm Status
Pharo Arm StatusESUG
 
[LibreOffice Asia Conference 2019] CJK Issues on LibreOffice(based on Korean ...
[LibreOffice Asia Conference 2019] CJK Issues on LibreOffice(based on Korean ...[LibreOffice Asia Conference 2019] CJK Issues on LibreOffice(based on Korean ...
[LibreOffice Asia Conference 2019] CJK Issues on LibreOffice(based on Korean ...DaeHyun Sung
 
Perl::Lint - Yet Another Perl Source Code Linter
Perl::Lint - Yet Another Perl Source Code LinterPerl::Lint - Yet Another Perl Source Code Linter
Perl::Lint - Yet Another Perl Source Code Lintermoznion
 
Semana Interop: Trabalhando com IronPython e com Ironruby
Semana Interop: Trabalhando com IronPython e com IronrubySemana Interop: Trabalhando com IronPython e com Ironruby
Semana Interop: Trabalhando com IronPython e com IronrubyAlessandro Binhara
 
[LibreOffice Korea-Japan online Seminar] Introduce to LibreOffice & Korean Is...
[LibreOffice Korea-Japan online Seminar] Introduce to LibreOffice & Korean Is...[LibreOffice Korea-Japan online Seminar] Introduce to LibreOffice & Korean Is...
[LibreOffice Korea-Japan online Seminar] Introduce to LibreOffice & Korean Is...DaeHyun Sung
 
Go for Rubyists. August 2018. RUG-B Meetup
Go for Rubyists. August 2018. RUG-B MeetupGo for Rubyists. August 2018. RUG-B Meetup
Go for Rubyists. August 2018. RUG-B MeetupKirill Zonov
 
FOSDEM 2020 Presentation : Precise, cross-project code navigation at GitHub s...
FOSDEM 2020 Presentation : Precise, cross-project code navigation at GitHub s...FOSDEM 2020 Presentation : Precise, cross-project code navigation at GitHub s...
FOSDEM 2020 Presentation : Precise, cross-project code navigation at GitHub s...Fasten Project
 
Python Intro For Managers
Python Intro For ManagersPython Intro For Managers
Python Intro For ManagersAtul Shridhar
 

La actualidad más candente (18)

ruby-cocoa
ruby-cocoaruby-cocoa
ruby-cocoa
 
Intro for RoR
Intro for RoRIntro for RoR
Intro for RoR
 
Ruby Presentation
Ruby Presentation Ruby Presentation
Ruby Presentation
 
Ruby Introduction
Ruby IntroductionRuby Introduction
Ruby Introduction
 
Using Aspects for Language Portability (SCAM 2010)
Using Aspects for Language Portability (SCAM 2010)Using Aspects for Language Portability (SCAM 2010)
Using Aspects for Language Portability (SCAM 2010)
 
Por que Rails?
Por que Rails? Por que Rails?
Por que Rails?
 
Extending Ruby using C++
Extending Ruby using C++Extending Ruby using C++
Extending Ruby using C++
 
Go Programming Language by Google
Go Programming Language by GoogleGo Programming Language by Google
Go Programming Language by Google
 
Pharo Arm Status
Pharo Arm StatusPharo Arm Status
Pharo Arm Status
 
[LibreOffice Asia Conference 2019] CJK Issues on LibreOffice(based on Korean ...
[LibreOffice Asia Conference 2019] CJK Issues on LibreOffice(based on Korean ...[LibreOffice Asia Conference 2019] CJK Issues on LibreOffice(based on Korean ...
[LibreOffice Asia Conference 2019] CJK Issues on LibreOffice(based on Korean ...
 
Perl::Lint - Yet Another Perl Source Code Linter
Perl::Lint - Yet Another Perl Source Code LinterPerl::Lint - Yet Another Perl Source Code Linter
Perl::Lint - Yet Another Perl Source Code Linter
 
Jython
JythonJython
Jython
 
Semana Interop: Trabalhando com IronPython e com Ironruby
Semana Interop: Trabalhando com IronPython e com IronrubySemana Interop: Trabalhando com IronPython e com Ironruby
Semana Interop: Trabalhando com IronPython e com Ironruby
 
[LibreOffice Korea-Japan online Seminar] Introduce to LibreOffice & Korean Is...
[LibreOffice Korea-Japan online Seminar] Introduce to LibreOffice & Korean Is...[LibreOffice Korea-Japan online Seminar] Introduce to LibreOffice & Korean Is...
[LibreOffice Korea-Japan online Seminar] Introduce to LibreOffice & Korean Is...
 
Go for Rubyists. August 2018. RUG-B Meetup
Go for Rubyists. August 2018. RUG-B MeetupGo for Rubyists. August 2018. RUG-B Meetup
Go for Rubyists. August 2018. RUG-B Meetup
 
Kotlin from-scratch
Kotlin from-scratchKotlin from-scratch
Kotlin from-scratch
 
FOSDEM 2020 Presentation : Precise, cross-project code navigation at GitHub s...
FOSDEM 2020 Presentation : Precise, cross-project code navigation at GitHub s...FOSDEM 2020 Presentation : Precise, cross-project code navigation at GitHub s...
FOSDEM 2020 Presentation : Precise, cross-project code navigation at GitHub s...
 
Python Intro For Managers
Python Intro For ManagersPython Intro For Managers
Python Intro For Managers
 

Similar a IronRuby for the .NET Developer

IronRuby: Ruby on the .NET Platform
IronRuby: Ruby on the .NET PlatformIronRuby: Ruby on the .NET Platform
IronRuby: Ruby on the .NET PlatformAndre John Cruz
 
Ruby'izing iOS development
Ruby'izing iOS developmentRuby'izing iOS development
Ruby'izing iOS developmenttoamitkumar
 
Ruby on Rails : First Mile
Ruby on Rails : First MileRuby on Rails : First Mile
Ruby on Rails : First MileGourab Mitra
 
Ruby On Rails Overview
Ruby On Rails OverviewRuby On Rails Overview
Ruby On Rails Overviewjonkinney
 
The story of language development
The story of language developmentThe story of language development
The story of language developmentHiroshi SHIBATA
 
Ruby on Rails : 簡介與入門
Ruby on Rails : 簡介與入門Ruby on Rails : 簡介與入門
Ruby on Rails : 簡介與入門Wen-Tien Chang
 
How to Begin to Develop Ruby Core
How to Begin to Develop Ruby CoreHow to Begin to Develop Ruby Core
How to Begin to Develop Ruby CoreHiroshi SHIBATA
 
Introduction to Ruby Native Extensions and Foreign Function Interface
Introduction to Ruby Native Extensions and Foreign Function InterfaceIntroduction to Ruby Native Extensions and Foreign Function Interface
Introduction to Ruby Native Extensions and Foreign Function InterfaceOleksii Sukhovii
 
Ruby on Rails Penetration Testing
Ruby on Rails Penetration TestingRuby on Rails Penetration Testing
Ruby on Rails Penetration Testing3S Labs
 
A rough guide to JavaScript Performance
A rough guide to JavaScript PerformanceA rough guide to JavaScript Performance
A rough guide to JavaScript Performanceallmarkedup
 
MacRuby & HotCocoa
MacRuby & HotCocoaMacRuby & HotCocoa
MacRuby & HotCocoaThilo Utke
 
An Introduction to Ruby on Rails 20100506
An Introduction to Ruby on Rails 20100506An Introduction to Ruby on Rails 20100506
An Introduction to Ruby on Rails 20100506Vu Hung Nguyen
 
An introduction-to-ruby-on-rails
An introduction-to-ruby-on-railsAn introduction-to-ruby-on-rails
An introduction-to-ruby-on-railsvinicorp
 
RubyMotion Introduction
RubyMotion IntroductionRubyMotion Introduction
RubyMotion IntroductionLori Olson
 

Similar a IronRuby for the .NET Developer (20)

IronRuby: Ruby on the .NET Platform
IronRuby: Ruby on the .NET PlatformIronRuby: Ruby on the .NET Platform
IronRuby: Ruby on the .NET Platform
 
Ruby'izing iOS development
Ruby'izing iOS developmentRuby'izing iOS development
Ruby'izing iOS development
 
Ruby on Rails : First Mile
Ruby on Rails : First MileRuby on Rails : First Mile
Ruby on Rails : First Mile
 
ruby-cocoa
ruby-cocoaruby-cocoa
ruby-cocoa
 
Ruby On Rails Overview
Ruby On Rails OverviewRuby On Rails Overview
Ruby On Rails Overview
 
Ruby On Rails
Ruby On RailsRuby On Rails
Ruby On Rails
 
Concurrency in ruby
Concurrency in rubyConcurrency in ruby
Concurrency in ruby
 
The story of language development
The story of language developmentThe story of language development
The story of language development
 
Ruby on Rails : 簡介與入門
Ruby on Rails : 簡介與入門Ruby on Rails : 簡介與入門
Ruby on Rails : 簡介與入門
 
How to Begin to Develop Ruby Core
How to Begin to Develop Ruby CoreHow to Begin to Develop Ruby Core
How to Begin to Develop Ruby Core
 
Ruby on Rails 3 Day BC
Ruby on Rails 3 Day BCRuby on Rails 3 Day BC
Ruby on Rails 3 Day BC
 
MacRuby
MacRubyMacRuby
MacRuby
 
ruby pentest
ruby pentestruby pentest
ruby pentest
 
Introduction to Ruby Native Extensions and Foreign Function Interface
Introduction to Ruby Native Extensions and Foreign Function InterfaceIntroduction to Ruby Native Extensions and Foreign Function Interface
Introduction to Ruby Native Extensions and Foreign Function Interface
 
Ruby on Rails Penetration Testing
Ruby on Rails Penetration TestingRuby on Rails Penetration Testing
Ruby on Rails Penetration Testing
 
A rough guide to JavaScript Performance
A rough guide to JavaScript PerformanceA rough guide to JavaScript Performance
A rough guide to JavaScript Performance
 
MacRuby & HotCocoa
MacRuby & HotCocoaMacRuby & HotCocoa
MacRuby & HotCocoa
 
An Introduction to Ruby on Rails 20100506
An Introduction to Ruby on Rails 20100506An Introduction to Ruby on Rails 20100506
An Introduction to Ruby on Rails 20100506
 
An introduction-to-ruby-on-rails
An introduction-to-ruby-on-railsAn introduction-to-ruby-on-rails
An introduction-to-ruby-on-rails
 
RubyMotion Introduction
RubyMotion IntroductionRubyMotion Introduction
RubyMotion Introduction
 

Más de Cory Foy

Defending Commoditization: Mapping Gameplays and Strategies to Stay Ahead in ...
Defending Commoditization: Mapping Gameplays and Strategies to Stay Ahead in ...Defending Commoditization: Mapping Gameplays and Strategies to Stay Ahead in ...
Defending Commoditization: Mapping Gameplays and Strategies to Stay Ahead in ...Cory Foy
 
Stratgic Play - Doing the Right Thing at the Right Time
Stratgic Play - Doing the Right Thing at the Right TimeStratgic Play - Doing the Right Thing at the Right Time
Stratgic Play - Doing the Right Thing at the Right TimeCory Foy
 
Continuous Deployment and Testing Workshop from Better Software West
Continuous Deployment and Testing Workshop from Better Software WestContinuous Deployment and Testing Workshop from Better Software West
Continuous Deployment and Testing Workshop from Better Software WestCory Foy
 
Choosing Between Scrum and Kanban - TriAgile 2015
Choosing Between Scrum and Kanban - TriAgile 2015Choosing Between Scrum and Kanban - TriAgile 2015
Choosing Between Scrum and Kanban - TriAgile 2015Cory Foy
 
Code Katas
Code KatasCode Katas
Code KatasCory Foy
 
Distributed Agility
Distributed AgilityDistributed Agility
Distributed AgilityCory Foy
 
Scaling Agility
Scaling AgilityScaling Agility
Scaling AgilityCory Foy
 
Kanban for DevOps
Kanban for DevOpsKanban for DevOps
Kanban for DevOpsCory Foy
 
Ruby and OO for Beginners
Ruby and OO for BeginnersRuby and OO for Beginners
Ruby and OO for BeginnersCory Foy
 
Agile Roots: The Agile Mindset - Agility Across the Organization
Agile Roots: The Agile Mindset - Agility Across the OrganizationAgile Roots: The Agile Mindset - Agility Across the Organization
Agile Roots: The Agile Mindset - Agility Across the OrganizationCory Foy
 
Triangle.rb - How Secure is Your Rails Site, Anyway?
Triangle.rb - How Secure is Your Rails Site, Anyway?Triangle.rb - How Secure is Your Rails Site, Anyway?
Triangle.rb - How Secure is Your Rails Site, Anyway?Cory Foy
 
Scrum vs Kanban - Implementing Agility at Scale
Scrum vs Kanban - Implementing Agility at ScaleScrum vs Kanban - Implementing Agility at Scale
Scrum vs Kanban - Implementing Agility at ScaleCory Foy
 
SQE Boston - When Code Cries
SQE Boston - When Code CriesSQE Boston - When Code Cries
SQE Boston - When Code CriesCory Foy
 
GOTO Berlin - When Code Cries
GOTO Berlin - When Code CriesGOTO Berlin - When Code Cries
GOTO Berlin - When Code CriesCory Foy
 
Rails as a Pattern Language
Rails as a Pattern LanguageRails as a Pattern Language
Rails as a Pattern LanguageCory Foy
 
Patterns in Rails
Patterns in RailsPatterns in Rails
Patterns in RailsCory Foy
 
Agile Demystified
Agile DemystifiedAgile Demystified
Agile DemystifiedCory Foy
 
When Code Cries
When Code CriesWhen Code Cries
When Code CriesCory Foy
 
Ruby for C# Developers
Ruby for C# DevelopersRuby for C# Developers
Ruby for C# DevelopersCory Foy
 
Getting Unstuck: Working with Legacy Code and Data
Getting Unstuck: Working with Legacy Code and DataGetting Unstuck: Working with Legacy Code and Data
Getting Unstuck: Working with Legacy Code and DataCory Foy
 

Más de Cory Foy (20)

Defending Commoditization: Mapping Gameplays and Strategies to Stay Ahead in ...
Defending Commoditization: Mapping Gameplays and Strategies to Stay Ahead in ...Defending Commoditization: Mapping Gameplays and Strategies to Stay Ahead in ...
Defending Commoditization: Mapping Gameplays and Strategies to Stay Ahead in ...
 
Stratgic Play - Doing the Right Thing at the Right Time
Stratgic Play - Doing the Right Thing at the Right TimeStratgic Play - Doing the Right Thing at the Right Time
Stratgic Play - Doing the Right Thing at the Right Time
 
Continuous Deployment and Testing Workshop from Better Software West
Continuous Deployment and Testing Workshop from Better Software WestContinuous Deployment and Testing Workshop from Better Software West
Continuous Deployment and Testing Workshop from Better Software West
 
Choosing Between Scrum and Kanban - TriAgile 2015
Choosing Between Scrum and Kanban - TriAgile 2015Choosing Between Scrum and Kanban - TriAgile 2015
Choosing Between Scrum and Kanban - TriAgile 2015
 
Code Katas
Code KatasCode Katas
Code Katas
 
Distributed Agility
Distributed AgilityDistributed Agility
Distributed Agility
 
Scaling Agility
Scaling AgilityScaling Agility
Scaling Agility
 
Kanban for DevOps
Kanban for DevOpsKanban for DevOps
Kanban for DevOps
 
Ruby and OO for Beginners
Ruby and OO for BeginnersRuby and OO for Beginners
Ruby and OO for Beginners
 
Agile Roots: The Agile Mindset - Agility Across the Organization
Agile Roots: The Agile Mindset - Agility Across the OrganizationAgile Roots: The Agile Mindset - Agility Across the Organization
Agile Roots: The Agile Mindset - Agility Across the Organization
 
Triangle.rb - How Secure is Your Rails Site, Anyway?
Triangle.rb - How Secure is Your Rails Site, Anyway?Triangle.rb - How Secure is Your Rails Site, Anyway?
Triangle.rb - How Secure is Your Rails Site, Anyway?
 
Scrum vs Kanban - Implementing Agility at Scale
Scrum vs Kanban - Implementing Agility at ScaleScrum vs Kanban - Implementing Agility at Scale
Scrum vs Kanban - Implementing Agility at Scale
 
SQE Boston - When Code Cries
SQE Boston - When Code CriesSQE Boston - When Code Cries
SQE Boston - When Code Cries
 
GOTO Berlin - When Code Cries
GOTO Berlin - When Code CriesGOTO Berlin - When Code Cries
GOTO Berlin - When Code Cries
 
Rails as a Pattern Language
Rails as a Pattern LanguageRails as a Pattern Language
Rails as a Pattern Language
 
Patterns in Rails
Patterns in RailsPatterns in Rails
Patterns in Rails
 
Agile Demystified
Agile DemystifiedAgile Demystified
Agile Demystified
 
When Code Cries
When Code CriesWhen Code Cries
When Code Cries
 
Ruby for C# Developers
Ruby for C# DevelopersRuby for C# Developers
Ruby for C# Developers
 
Getting Unstuck: Working with Legacy Code and Data
Getting Unstuck: Working with Legacy Code and DataGetting Unstuck: Working with Legacy Code and Data
Getting Unstuck: Working with Legacy Code and Data
 

Último

9 Steps For Building Winning Founding Team
9 Steps For Building Winning Founding Team9 Steps For Building Winning Founding Team
9 Steps For Building Winning Founding TeamAdam Moalla
 
UiPath Studio Web workshop series - Day 7
UiPath Studio Web workshop series - Day 7UiPath Studio Web workshop series - Day 7
UiPath Studio Web workshop series - Day 7DianaGray10
 
Connector Corner: Extending LLM automation use cases with UiPath GenAI connec...
Connector Corner: Extending LLM automation use cases with UiPath GenAI connec...Connector Corner: Extending LLM automation use cases with UiPath GenAI connec...
Connector Corner: Extending LLM automation use cases with UiPath GenAI connec...DianaGray10
 
Comparing Sidecar-less Service Mesh from Cilium and Istio
Comparing Sidecar-less Service Mesh from Cilium and IstioComparing Sidecar-less Service Mesh from Cilium and Istio
Comparing Sidecar-less Service Mesh from Cilium and IstioChristian Posta
 
Meet the new FSP 3000 M-Flex800™
Meet the new FSP 3000 M-Flex800™Meet the new FSP 3000 M-Flex800™
Meet the new FSP 3000 M-Flex800™Adtran
 
Empowering Africa's Next Generation: The AI Leadership Blueprint
Empowering Africa's Next Generation: The AI Leadership BlueprintEmpowering Africa's Next Generation: The AI Leadership Blueprint
Empowering Africa's Next Generation: The AI Leadership BlueprintMahmoud Rabie
 
IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019
IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019
IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019IES VE
 
activity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdf
activity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdf
activity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdfJamie (Taka) Wang
 
AI You Can Trust - Ensuring Success with Data Integrity Webinar
AI You Can Trust - Ensuring Success with Data Integrity WebinarAI You Can Trust - Ensuring Success with Data Integrity Webinar
AI You Can Trust - Ensuring Success with Data Integrity WebinarPrecisely
 
Cybersecurity Workshop #1.pptx
Cybersecurity Workshop #1.pptxCybersecurity Workshop #1.pptx
Cybersecurity Workshop #1.pptxGDSC PJATK
 
COMPUTER 10 Lesson 8 - Building a Website
COMPUTER 10 Lesson 8 - Building a WebsiteCOMPUTER 10 Lesson 8 - Building a Website
COMPUTER 10 Lesson 8 - Building a Websitedgelyza
 
Anypoint Code Builder , Google Pub sub connector and MuleSoft RPA
Anypoint Code Builder , Google Pub sub connector and MuleSoft RPAAnypoint Code Builder , Google Pub sub connector and MuleSoft RPA
Anypoint Code Builder , Google Pub sub connector and MuleSoft RPAshyamraj55
 
Building Your Own AI Instance (TBLC AI )
Building Your Own AI Instance (TBLC AI )Building Your Own AI Instance (TBLC AI )
Building Your Own AI Instance (TBLC AI )Brian Pichman
 
20230202 - Introduction to tis-py
20230202 - Introduction to tis-py20230202 - Introduction to tis-py
20230202 - Introduction to tis-pyJamie (Taka) Wang
 
Building AI-Driven Apps Using Semantic Kernel.pptx
Building AI-Driven Apps Using Semantic Kernel.pptxBuilding AI-Driven Apps Using Semantic Kernel.pptx
Building AI-Driven Apps Using Semantic Kernel.pptxUdaiappa Ramachandran
 
Bird eye's view on Camunda open source ecosystem
Bird eye's view on Camunda open source ecosystemBird eye's view on Camunda open source ecosystem
Bird eye's view on Camunda open source ecosystemAsko Soukka
 
Linked Data in Production: Moving Beyond Ontologies
Linked Data in Production: Moving Beyond OntologiesLinked Data in Production: Moving Beyond Ontologies
Linked Data in Production: Moving Beyond OntologiesDavid Newbury
 
VoIP Service and Marketing using Odoo and Asterisk PBX
VoIP Service and Marketing using Odoo and Asterisk PBXVoIP Service and Marketing using Odoo and Asterisk PBX
VoIP Service and Marketing using Odoo and Asterisk PBXTarek Kalaji
 
UiPath Studio Web workshop series - Day 8
UiPath Studio Web workshop series - Day 8UiPath Studio Web workshop series - Day 8
UiPath Studio Web workshop series - Day 8DianaGray10
 

Último (20)

9 Steps For Building Winning Founding Team
9 Steps For Building Winning Founding Team9 Steps For Building Winning Founding Team
9 Steps For Building Winning Founding Team
 
20150722 - AGV
20150722 - AGV20150722 - AGV
20150722 - AGV
 
UiPath Studio Web workshop series - Day 7
UiPath Studio Web workshop series - Day 7UiPath Studio Web workshop series - Day 7
UiPath Studio Web workshop series - Day 7
 
Connector Corner: Extending LLM automation use cases with UiPath GenAI connec...
Connector Corner: Extending LLM automation use cases with UiPath GenAI connec...Connector Corner: Extending LLM automation use cases with UiPath GenAI connec...
Connector Corner: Extending LLM automation use cases with UiPath GenAI connec...
 
Comparing Sidecar-less Service Mesh from Cilium and Istio
Comparing Sidecar-less Service Mesh from Cilium and IstioComparing Sidecar-less Service Mesh from Cilium and Istio
Comparing Sidecar-less Service Mesh from Cilium and Istio
 
Meet the new FSP 3000 M-Flex800™
Meet the new FSP 3000 M-Flex800™Meet the new FSP 3000 M-Flex800™
Meet the new FSP 3000 M-Flex800™
 
Empowering Africa's Next Generation: The AI Leadership Blueprint
Empowering Africa's Next Generation: The AI Leadership BlueprintEmpowering Africa's Next Generation: The AI Leadership Blueprint
Empowering Africa's Next Generation: The AI Leadership Blueprint
 
IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019
IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019
IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019
 
activity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdf
activity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdf
activity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdf
 
AI You Can Trust - Ensuring Success with Data Integrity Webinar
AI You Can Trust - Ensuring Success with Data Integrity WebinarAI You Can Trust - Ensuring Success with Data Integrity Webinar
AI You Can Trust - Ensuring Success with Data Integrity Webinar
 
Cybersecurity Workshop #1.pptx
Cybersecurity Workshop #1.pptxCybersecurity Workshop #1.pptx
Cybersecurity Workshop #1.pptx
 
COMPUTER 10 Lesson 8 - Building a Website
COMPUTER 10 Lesson 8 - Building a WebsiteCOMPUTER 10 Lesson 8 - Building a Website
COMPUTER 10 Lesson 8 - Building a Website
 
Anypoint Code Builder , Google Pub sub connector and MuleSoft RPA
Anypoint Code Builder , Google Pub sub connector and MuleSoft RPAAnypoint Code Builder , Google Pub sub connector and MuleSoft RPA
Anypoint Code Builder , Google Pub sub connector and MuleSoft RPA
 
Building Your Own AI Instance (TBLC AI )
Building Your Own AI Instance (TBLC AI )Building Your Own AI Instance (TBLC AI )
Building Your Own AI Instance (TBLC AI )
 
20230202 - Introduction to tis-py
20230202 - Introduction to tis-py20230202 - Introduction to tis-py
20230202 - Introduction to tis-py
 
Building AI-Driven Apps Using Semantic Kernel.pptx
Building AI-Driven Apps Using Semantic Kernel.pptxBuilding AI-Driven Apps Using Semantic Kernel.pptx
Building AI-Driven Apps Using Semantic Kernel.pptx
 
Bird eye's view on Camunda open source ecosystem
Bird eye's view on Camunda open source ecosystemBird eye's view on Camunda open source ecosystem
Bird eye's view on Camunda open source ecosystem
 
Linked Data in Production: Moving Beyond Ontologies
Linked Data in Production: Moving Beyond OntologiesLinked Data in Production: Moving Beyond Ontologies
Linked Data in Production: Moving Beyond Ontologies
 
VoIP Service and Marketing using Odoo and Asterisk PBX
VoIP Service and Marketing using Odoo and Asterisk PBXVoIP Service and Marketing using Odoo and Asterisk PBX
VoIP Service and Marketing using Odoo and Asterisk PBX
 
UiPath Studio Web workshop series - Day 8
UiPath Studio Web workshop series - Day 8UiPath Studio Web workshop series - Day 8
UiPath Studio Web workshop series - Day 8
 

IronRuby for the .NET Developer

  • 1. + + = IronRuby for the .NET Developer Cory Foy - Cory Foy, LLC foyc@coryfoy.com - @cory_foy
  • 3. History Ruby and .NET Ruby to .NET Ruby CLR Project RubyCLR All attempted to run Ruby on top of the CLR
  • 4. History CLR 2.0 (.NET 3.0 and 3.5 were still CLR 2.0) No dynamic dispatch Everything had to be compiled Lots of magic, and shims
  • 5. History CLR 2.0 (.NET 3.0 and 3.5 were still CLR 2.0) No dynamic dispatch Everything had to be compiled Lots of magic, and shims CREDIT: HTTP://WWW.FLICKR.COM/PHOTOS/37341680@N04/4278580062
  • 6. History alias alias_method_missing method_missing def method_missing(name, *params) alias_method_missing(name, *params) unless name == :Count create_ruby_instance_method(self.class, 'Count') do include 'System.Collections' ldarg_2 call 'static Marshal::ToClrObject(VALUE)' call 'ArrayList::get_Count()' call 'static Marshal::ToRubyNumber(Int32)' ret end self.Count end
  • 7. History CLR 4.0 Dynamic keyword (C#)
  • 8. History CLR 4.0 Dynamic keyword (C#) Calculator calc = GetCalculator(); int sum = calc.Add(1, 3);
  • 9. History CLR 4.0 Dynamic keyword (C#) var calc = GetCalculator(); int sum = calc.Add(1, 3);
  • 10. History CLR 4.0 Dynamic keyword (C#) object calc = GetCalculator(); Type calcType = calc.GetType(); object res = calcType.InvokeMember("Add", BindingFlags.InvokeMethod, null, new object[] { 10, 20 }); int sum = Convert.ToInt32(res);
  • 11. History CLR 4.0 Dynamic keyword (C#) dynamic calc = GetCalculator(); int sum = calc.Add(1, 3);
  • 12. History DLR Introduced in 2007 Set of libraries to assist language developers Still runs on the CLI, and can access the CLR Standardizes the implementation of dynamic languages on the CLI/CLR
  • 13. History IronRuby John Lam hired by Microsoft in 2006 Announced in 2007 at MIX7 Goal to make Ruby a first-class citizen Completely rewritten to take advantage of the DLR
  • 14. History DLR Dynamic Language Runtime (DLR) Common Language Runtime (CLR)
  • 15. History DLR Dynamic Language Runtime (DLR) Common Hosting Model Common Language Runtime (CLR)
  • 16. History DLR Dynamic Language Runtime (DLR) Common Runtime Hosting Model Common Language Runtime (CLR)
  • 17. History DLR Dynamic Language Runtime (DLR) Common Language Runtime Hosting Model Implementation Common Language Runtime (CLR)
  • 18. History Ruby Dynamic Language Runtime Common Language Runtime
  • 19. History Ruby Dynamic Language Runtime Common Language Runtime
  • 20. History Ruby VB C# Dynamic Language Runtime Common Language Runtime
  • 21. History Ruby VB C# Dynamic Language Runtime Common Language Runtime
  • 22. History Ruby VB C# Dynamic Language Runtime Common Language Runtime
  • 23. History Ruby VB C# Dynamic Language Runtime Common Language Runtime
  • 24. History Ruby VB C# Dynamic Language Runtime Common Language Runtime
  • 25. History Ruby VB C# Dynamic Language Runtime Common Language Runtime
  • 26. History Ruby VB C# Dynamic Language Runtime Common Language Runtime
  • 30. CREDIT: HTTP://WWW.FLICKR.COM/ PHOTOS/19684903@N00/317182464 CREDIT: HTTP://WWW.FLICKR.COM/ PHOTOS/WWWORKS/3800306463 RUBY IS LOVE! CREDIT: HTTP://WWW.FLICKR.COM/ PHOTOS/STUCKINCUSTOMS/2366980580 CREDIT: HTTP://WWW.FLICKR.COM/ PHOTOS/EXPRESSMONORAIL/2631659122
  • 33. TYPE SAFETY CODE SAFETY OBJECT GRAPHS DEBUGGING STATIC CODE ANALYSIS SEALED TYPES INTELLISENSE COMPILER CATCHES ERRORS
  • 34. TYPE SAFETY CODE SAFETY OBJECT GRAPHS DEBUGGING STATIC CODE ANALYSIS SEALED TYPES INTELLISENSE COMPILER CATCHES ERRORS
  • 38. Metaprogramming CREDIT: HTTP://WWW.FLICKR.COM/ PHOTOS/CHOCONANCY/2470073711 All Classes Are Open Definitions are active All method calls have a receiver Classes are objects
  • 39. WHAT IS THIS? AND WHY IS IT HERE?
  • 40. WHAT IS THIS? AND WHY IS IT HERE?
  • 41. WHAT IS THIS? AND WHY IS IT HERE?
  • 42. WHAT IS THIS? AND WHY IS IT HERE?
  • 44. Open Classes CREDIT: HTTP://COMMONS.WIKIMEDIA.ORG/WIKI/ FILE:NEON_OPEN_SIGN.JPG
  • 46. method_missing CREDIT: HTTP://WWW.FLICKR.COM/ PHOTOS/TAITOH/3029653729/
  • 47. Dynamism CREDIT: HTTP://WWW.FLICKR.COM/PHOTOS/ LABGUEST/3510995344/
  • 48. RubyGems Standardized Packaging System Central Repository for hosting packages Allows for installation and management of multiple installed versions
  • 50. RubyGems THAT’S IT!
  • 53. IronRuby Basics Installing http://ironruby.net/Download
  • 54. IronRuby Basics Installing http://ironruby.net/Download Download Windows Installer
  • 55. IronRuby Basics Installing http://ironruby.net/Download Download Windows Installer ???
  • 56. IronRuby Basics Installing http://ironruby.net/Download Download Windows Installer ??? Profit!!!
  • 58. IronRuby Basics ..and what did we just install?
  • 59. IronRuby Basics ..and what did we just install? bin - IronRuby executables (ir.exe, etc)
  • 60. IronRuby Basics ..and what did we just install? bin - IronRuby executables (ir.exe, etc) lib - Helpers for including assemblies and other common tasks
  • 61. IronRuby Basics ..and what did we just install? bin - IronRuby executables (ir.exe, etc) lib - Helpers for including assemblies and other common tasks samples - Contains the Tutorial app and others
  • 62. IronRuby Basics ..and what did we just install? bin - IronRuby executables (ir.exe, etc) lib - Helpers for including assemblies and other common tasks samples - Contains the Tutorial app and others silverlight - Contains the Silverlight Dynamic Languages SDK
  • 63. IronRuby Basics ..and, how the heck did it just do that? Dynamic Language Runtime (DLR) Common Language Runtime Hosting Model Implementation Common Language Runtime (CLR)
  • 64. IronRuby Basics ..and, how the heck did it just do that? Runtime Call sites Binders Rules Common Language Runtime (CLR)
  • 65. IronRuby Basics ..and, how the heck did it just do that? Language Implementation Language ASTs Compiler Context Common Language Runtime (CLR)
  • 66. IronRuby Basics ..and, how the heck did it just do that? Common Hosting Model ScriptRuntime ScriptEngine ScriptScope ScriptSource Common Language Runtime (CLR)
  • 67. Integration Calling .NET from IronRuby Calling IronRuby from .NET WinForms / WPF / Silverlight Cucumber / RSpec
  • 68. Get Involved! Website - http://ironruby.net http://ironruby.codeplex.com/ http://github.com/ironruby Mailing List - http://rubyforge.org/mailman/listinfo/ ironruby-core foyc@coryfoy.com | @cory_foy Slides @ http://blog.coryfoy.com

Notas del editor

  1. Sample Ruby App, Extend Access to .NET Object, Extend to pop up a WinForms MessageBox, Extend to do a 3D WPF “Hello MIX10!”
  2. Ruby to .NET - Thomas Sondergaard - 2003 Ruby CLR Project - Funded by Microsoft / Queensland Univ of Tech RubyCLR - John Lam’s first attempt
  3. Yep, it’s all about the magic. What kind of magic?
  4. Yep, it’s all about the magic. What kind of magic?
  5. This kind of magic
  6. So, Why Ruby? What’s so great about Ruby?
  7. So, Why Ruby? What’s so great about Ruby?
  8. So, Why Ruby? What’s so great about Ruby?
  9. So, Why Ruby? What’s so great about Ruby?
  10. So, Why Ruby? What’s so great about Ruby?
  11. So, Why Ruby? What’s so great about Ruby?
  12. So, Why Ruby? What’s so great about Ruby?
  13. So, Why Ruby? What’s so great about Ruby?
  14. So, Why Ruby? What’s so great about Ruby?
  15. But I hear many of you are quite skeptical.
  16. But I’m going to sidestep all of these with one statement
  17. But I’m going to sidestep all of these with one statement
  18. But I’m going to sidestep all of these with one statement
  19. But I’m going to sidestep all of these with one statement
  20. But I’m going to sidestep all of these with one statement
  21. But I’m going to sidestep all of these with one statement
  22. But I’m going to sidestep all of these with one statement
  23. But I’m going to sidestep all of these with one statement
  24. But I’m going to sidestep all of these with one statement
  25. Performance Implications next
  26. Nor am I going to dive into performance implications. Compiled code is going to be faster. But I am going to talk about something very cool in Ruby
  27. This allows us to build DSLs. If we think about what we use on a daily basis, it equates to lots of DSLs - MSBuild scripts, proj files, SQL Queries.
  28. Discuss installing, and the layout of the project, then show a simple IronRuby form and talk about how the request was processed through the system.
  29. Discuss installing, and the layout of the project, then show a simple IronRuby form and talk about how the request was processed through the system.
  30. Discuss installing, and the layout of the project, then show a simple IronRuby form and talk about how the request was processed through the system.
  31. Discuss installing, and the layout of the project, then show a simple IronRuby form and talk about how the request was processed through the system.
  32. Discuss installing, and the layout of the project, then show a simple IronRuby form and talk about how the request was processed through the system.
  33. Discuss installing, and the layout of the project, then show a simple IronRuby form and talk about how the request was processed through the system.
  34. Discuss installing, and the layout of the project, then show a simple IronRuby form and talk about how the request was processed through the system.
  35. Discuss installing, and the layout of the project, then show a simple IronRuby form and talk about how the request was processed through the system.
  36. Discuss installing, and the layout of the project, then show a simple IronRuby form and talk about how the request was processed through the system.
  37. Discuss installing, and the layout of the project, then show a simple IronRuby form and talk about how the request was processed through the system.