SlideShare ist ein Scribd-Unternehmen logo
1 von 69
+                   +

   =

        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 ïŹrst-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
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
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
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

DeïŹnitions 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

  ???

  ProïŹt!!!
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

Weitere Àhnliche Inhalte

Was ist angesagt?

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
 
Kotlin from-scratch
Kotlin from-scratchKotlin from-scratch
Kotlin from-scratchFranco Lombardo
 
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
 

Was ist angesagt? (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
 

Ähnlich wie 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
 
Ruby On Rails
Ruby On RailsRuby On Rails
Ruby On RailsEric Berry
 
Concurrency in ruby
Concurrency in rubyConcurrency in ruby
Concurrency in rubyMarco Borromeo
 
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
 
MacRuby
MacRubyMacRuby
MacRubybostonrb
 
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
An introduction-to-ruby-on-railsAn introduction-to-ruby-on-rails
An introduction-to-ruby-on-railsvinicorp
 
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
 
RubyMotion Introduction
RubyMotion IntroductionRubyMotion Introduction
RubyMotion IntroductionLori Olson
 

Ähnlich wie 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
An introduction-to-ruby-on-railsAn introduction-to-ruby-on-rails
An introduction-to-ruby-on-rails
 
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
 
RubyMotion Introduction
RubyMotion IntroductionRubyMotion Introduction
RubyMotion Introduction
 

Mehr von 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
 

Mehr von 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
 

KĂŒrzlich hochgeladen

Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel AraĂșjo
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesBoston Institute of Analytics
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 

KĂŒrzlich hochgeladen (20)

Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 

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 ïŹrst-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
  • 27.
  • 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
  • 32.
  • 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
  • 35.
  • 38. Metaprogramming CREDIT: HTTP://WWW.FLICKR.COM/ PHOTOS/CHOCONANCY/2470073711 All Classes Are Open DeïŹnitions 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 ??? ProïŹt!!!
  • 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

Hinweis der Redaktion

  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.