SlideShare a Scribd company logo
IronRuby – A brave new world for .Net @Ben_Hall, Developerester, 7digital.com Ben@BenHall.me.uk  Blog.BenHall.me.uk                 CodeBetter.com/blogs/BenHall
London (UK) based C# MVPWeb Developer @ 7digital.com Working on a number of Open Source Projects Co-Author of  Testing ASP.net Web Applications http://www.testingaspnet.com
Agenda Ruby IronRuby DLR Merging IronRuby and C#
What is Ruby?
Why?
Right language for the right job
Everything is an object “Hello World”.upcase [5,3,4,1,6].sort 10.times { |i| puts “Loop count: #{i}” }
Blocks 10.times do |i|    puts “Loop count: #{i}” end Loop count: 0 Loop count: 1 Loop count: 2 Loop count: 3 Loop count: 4 Loop count: 5 Loop count: 6 Loop count: 7 Loop count: 8 Loop count: 9
Blocks search_engines =   %W[Google Yahoo Bing].map do |engine|    "http://www.#{engine.downcase}.com"  end search_engines = [     ‘http://www.google.com’,       ‘http://www.yahoo.com’,       ‘http://www.bing.com’ ]
Natural Programming x = [1,2,3] y = [4,5,6] >>> x + y  => [1,2,3,4,5,6]
Duck Typing # Message sends itself via some transport protocol class Message   def publish(transport)     puts transport.send(self)   end end http://www.flickr.com/photos/normis/337183421/
Duck Typing class Queue    def send(message)        @server.open        @server.issue(message)        @server.close    end end
Duck Typing class SmtpService    def send(message)       @service.post(message)     end end
Duck Typing m = Message.new m.subject = “Hello TechDays!” q = Queue.new s = SmtpService.new m.publish(q) m.publish(s)
Duck Typing class Postman    def send(message) phone_number = 012398622 @john.call(phone_number)    end end m.publish(Postman.new)
Mixins class ProductPage < CMS::BasePage include Editable    includeThemeable includeDroppableCustomisations end
Extendable class Fixnum    def odd?()        !even?    end    def even?()       self % 2 == 0    end end >>> 1.odd? => true >>> 1.even? => false >>> 2.odd? => false >>> 2.even? => true
Blended of multiple languages
“Ruby is simple in appearance, but is very complex inside, just like our human body” Yukihiro “matz” Matsumoto – Creator of Ruby
“trying to make Ruby natural, not simple” Yukihiro “matz” Matsumoto – Creator of Ruby
Frameworks Rails   (Web) ActiveRecord  (ORM) Sinatra  (Web) RSpec  (BDD Unit Testing) Cucumber  (Acceptance Testing)
If that’s Ruby What’s IronRuby? http://www.flickr.com/photos/bflv/3328427869/
DEMOs
Static language => Dynamic language http://github.com/BenHall/IronRuby_CSharp_Type_Interop
Ruby Frameworks     - Exposing NHibernate domain model in a ‘RESTful’ way http://github.com/BenHall/IronRestfulRails
@post = r.GetPost("PostID", params[:id].to_i)class PostRepository  def method_missing(m, *args)columnName = m.id2name.sub(/find_by_/, "")get_postcolumnName, *args  endend@post = r.find_by_PostID 1@post = r.find_by_Title “Post 1" http://github.com/BenHall/IronRestfulRails
Ruby Frameworks - erb http://github.com/BenHall/IronRuby_Erb_Templating
C# Frameworks - WPF
C# Frameworks - MeerPush http://github.com/BenHall/MeerPush
What is the DLR? http://www.flickr.com/photos/lastrounds/3199561205/sizes/o/
IronPython ?
Combing the two worlds http://www.flickr.com/photos/mendhak/2117622450/sizes/o/
Embedding IronRuby into C# http://github.com/BenHall/EmbeddedIronRuby
Extending C# applications using Ruby and MEF http://github.com/BenHall/ExtendViaMEF
Data Gen Screenshot
Reflector Screenshot
Resolver Systems
C# 4.0 - dynamic         static void Main(string[] args)         { Console.WriteLine("Executing from C#"); ScriptRuntime runtime = IronRuby.Ruby.CreateRuntime(); ScriptScope scope = runtime.ExecuteFile("person.rb");             dynamic person = scope.Engine.Execute("Person.new"); person.say_hello(); Console.ReadLine();         } Program.cs person.rb class Person    def say_hello       puts "Hello world from IronRuby!"    end end http://github.com/BenHall/IronRuby_CSharp_4
Testing C# applications http://github.com/BenHall/wipflash_cucumber_driven_example
Ruby Everywhere!
How will the DLR  change your world?
@Ben_Hall Ben@BenHall.me.uk Blog.BenHall.me.uk http://lolcatgenerator.com/lolcat/120/

More Related Content

What's hot

Happy Programming with CoffeeScript
Happy Programming with CoffeeScriptHappy Programming with CoffeeScript
Happy Programming with CoffeeScriptEddie Kao
 
Ember.js Meetup Brussels 31/10/2013
Ember.js Meetup Brussels 31/10/2013Ember.js Meetup Brussels 31/10/2013
Ember.js Meetup Brussels 31/10/2013
Hstry
 
CoffeeScript presentation
CoffeeScript presentationCoffeeScript presentation
CoffeeScript presentationJohn Lynch
 
Developing cross platform desktop application with Ruby
Developing cross platform desktop application with RubyDeveloping cross platform desktop application with Ruby
Developing cross platform desktop application with Ruby
Anis Ahmad
 
J Ruby Meetup Engine Yard Feb2011
J Ruby Meetup Engine Yard Feb2011J Ruby Meetup Engine Yard Feb2011
J Ruby Meetup Engine Yard Feb2011baqhaidri
 
Ruby on Rails for beginners
Ruby on Rails for beginnersRuby on Rails for beginners
Ruby on Rails for beginners
Vysakh Sreenivasan
 
CoffeeScript: A beginner's presentation for beginners copy
CoffeeScript: A beginner's presentation for beginners copyCoffeeScript: A beginner's presentation for beginners copy
CoffeeScript: A beginner's presentation for beginners copy
Patrick Devins
 
Ruby application based on http
Ruby application based on httpRuby application based on http
Ruby application based on http
Richard Huang
 
Ruby on Rails Presentation
Ruby on Rails PresentationRuby on Rails Presentation
Ruby on Rails Presentation
Michael MacDonald
 
Behavior Driven Infrastructure 2011-01
Behavior Driven Infrastructure 2011-01Behavior Driven Infrastructure 2011-01
Behavior Driven Infrastructure 2011-01
Jeffrey Hulten
 
Ruby on Rails
Ruby on RailsRuby on Rails
Ruby on Rails
Aizat Faiz
 
When To Use Ruby On Rails
When To Use Ruby On RailsWhen To Use Ruby On Rails
When To Use Ruby On Rails
dosire
 
Jan Čurn: Meteor: the full-stack JavaScript framework
Jan Čurn: Meteor: the full-stack JavaScript frameworkJan Čurn: Meteor: the full-stack JavaScript framework
Jan Čurn: Meteor: the full-stack JavaScript framework
Develcz
 
Text expansion in vim
Text expansion in vimText expansion in vim
Text expansion in vimmattboehm
 
Ruby on Rails Presentation
Ruby on Rails PresentationRuby on Rails Presentation
Ruby on Rails Presentation
adamcookeuk
 
Ruby Basics
Ruby BasicsRuby Basics
Ruby Basics
SHC
 
AWS user group September 2017 - Rob Ribeiro "Seeking Solutions for Debugging ...
AWS user group September 2017 - Rob Ribeiro "Seeking Solutions for Debugging ...AWS user group September 2017 - Rob Ribeiro "Seeking Solutions for Debugging ...
AWS user group September 2017 - Rob Ribeiro "Seeking Solutions for Debugging ...
AWS Chicago
 
Артем Маркушев - JavaScript
Артем Маркушев - JavaScriptАртем Маркушев - JavaScript
Артем Маркушев - JavaScriptDataArt
 
WappZapp & Appcelerator Titanium
WappZapp & Appcelerator TitaniumWappZapp & Appcelerator Titanium
WappZapp & Appcelerator TitaniumWienke Giezeman
 
Plumbin Pipelines - A Gulp.js workshop
Plumbin Pipelines - A Gulp.js workshopPlumbin Pipelines - A Gulp.js workshop
Plumbin Pipelines - A Gulp.js workshop
Stefan Baumgartner
 

What's hot (20)

Happy Programming with CoffeeScript
Happy Programming with CoffeeScriptHappy Programming with CoffeeScript
Happy Programming with CoffeeScript
 
Ember.js Meetup Brussels 31/10/2013
Ember.js Meetup Brussels 31/10/2013Ember.js Meetup Brussels 31/10/2013
Ember.js Meetup Brussels 31/10/2013
 
CoffeeScript presentation
CoffeeScript presentationCoffeeScript presentation
CoffeeScript presentation
 
Developing cross platform desktop application with Ruby
Developing cross platform desktop application with RubyDeveloping cross platform desktop application with Ruby
Developing cross platform desktop application with Ruby
 
J Ruby Meetup Engine Yard Feb2011
J Ruby Meetup Engine Yard Feb2011J Ruby Meetup Engine Yard Feb2011
J Ruby Meetup Engine Yard Feb2011
 
Ruby on Rails for beginners
Ruby on Rails for beginnersRuby on Rails for beginners
Ruby on Rails for beginners
 
CoffeeScript: A beginner's presentation for beginners copy
CoffeeScript: A beginner's presentation for beginners copyCoffeeScript: A beginner's presentation for beginners copy
CoffeeScript: A beginner's presentation for beginners copy
 
Ruby application based on http
Ruby application based on httpRuby application based on http
Ruby application based on http
 
Ruby on Rails Presentation
Ruby on Rails PresentationRuby on Rails Presentation
Ruby on Rails Presentation
 
Behavior Driven Infrastructure 2011-01
Behavior Driven Infrastructure 2011-01Behavior Driven Infrastructure 2011-01
Behavior Driven Infrastructure 2011-01
 
Ruby on Rails
Ruby on RailsRuby on Rails
Ruby on Rails
 
When To Use Ruby On Rails
When To Use Ruby On RailsWhen To Use Ruby On Rails
When To Use Ruby On Rails
 
Jan Čurn: Meteor: the full-stack JavaScript framework
Jan Čurn: Meteor: the full-stack JavaScript frameworkJan Čurn: Meteor: the full-stack JavaScript framework
Jan Čurn: Meteor: the full-stack JavaScript framework
 
Text expansion in vim
Text expansion in vimText expansion in vim
Text expansion in vim
 
Ruby on Rails Presentation
Ruby on Rails PresentationRuby on Rails Presentation
Ruby on Rails Presentation
 
Ruby Basics
Ruby BasicsRuby Basics
Ruby Basics
 
AWS user group September 2017 - Rob Ribeiro "Seeking Solutions for Debugging ...
AWS user group September 2017 - Rob Ribeiro "Seeking Solutions for Debugging ...AWS user group September 2017 - Rob Ribeiro "Seeking Solutions for Debugging ...
AWS user group September 2017 - Rob Ribeiro "Seeking Solutions for Debugging ...
 
Артем Маркушев - JavaScript
Артем Маркушев - JavaScriptАртем Маркушев - JavaScript
Артем Маркушев - JavaScript
 
WappZapp & Appcelerator Titanium
WappZapp & Appcelerator TitaniumWappZapp & Appcelerator Titanium
WappZapp & Appcelerator Titanium
 
Plumbin Pipelines - A Gulp.js workshop
Plumbin Pipelines - A Gulp.js workshopPlumbin Pipelines - A Gulp.js workshop
Plumbin Pipelines - A Gulp.js workshop
 

Viewers also liked

Group Colloquium Assignment
Group Colloquium AssignmentGroup Colloquium Assignment
Group Colloquium Assignmentmelissa_jm89
 
Testing ASP.net Web Applications
Testing ASP.net Web ApplicationsTesting ASP.net Web Applications
Testing ASP.net Web Applications
Ben Hall
 
Testing ASP.net Web Applications using Ruby
Testing ASP.net Web Applications using RubyTesting ASP.net Web Applications using Ruby
Testing ASP.net Web Applications using Ruby
Ben Hall
 
Taking advantage of the Amazon Web Services (AWS) Family
Taking advantage of the Amazon Web Services (AWS) FamilyTaking advantage of the Amazon Web Services (AWS) Family
Taking advantage of the Amazon Web Services (AWS) Family
Ben Hall
 
Creating extensible application using MEF
Creating extensible application using MEFCreating extensible application using MEF
Creating extensible application using MEF
Ben Hall
 
Embracing Startup Life and learning to think The Startup Way
Embracing Startup Life and learning to think The Startup WayEmbracing Startup Life and learning to think The Startup Way
Embracing Startup Life and learning to think The Startup Way
Ben Hall
 

Viewers also liked (7)

Group Colloquium Assignment
Group Colloquium AssignmentGroup Colloquium Assignment
Group Colloquium Assignment
 
Testing ASP.net Web Applications
Testing ASP.net Web ApplicationsTesting ASP.net Web Applications
Testing ASP.net Web Applications
 
Testing ASP.net Web Applications using Ruby
Testing ASP.net Web Applications using RubyTesting ASP.net Web Applications using Ruby
Testing ASP.net Web Applications using Ruby
 
Taking advantage of the Amazon Web Services (AWS) Family
Taking advantage of the Amazon Web Services (AWS) FamilyTaking advantage of the Amazon Web Services (AWS) Family
Taking advantage of the Amazon Web Services (AWS) Family
 
Creating extensible application using MEF
Creating extensible application using MEFCreating extensible application using MEF
Creating extensible application using MEF
 
Valentine's Day Weekend
Valentine's Day WeekendValentine's Day Weekend
Valentine's Day Weekend
 
Embracing Startup Life and learning to think The Startup Way
Embracing Startup Life and learning to think The Startup WayEmbracing Startup Life and learning to think The Startup Way
Embracing Startup Life and learning to think The Startup Way
 

Similar to TechDays - IronRuby

Iron Languages - NYC CodeCamp 2/19/2011
Iron Languages - NYC CodeCamp 2/19/2011Iron Languages - NYC CodeCamp 2/19/2011
Iron Languages - NYC CodeCamp 2/19/2011
Jimmy Schementi
 
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
Hiroshi SHIBATA
 
Why Ruby?
Why Ruby? Why Ruby?
Why Ruby?
IT Weekend
 
4 JVM Web Frameworks
4 JVM Web Frameworks4 JVM Web Frameworks
4 JVM Web Frameworks
Joe Kutner
 
.NET Foundation, Future of .NET and C#
.NET Foundation, Future of .NET and C#.NET Foundation, Future of .NET and C#
.NET Foundation, Future of .NET and C#
Bertrand Le Roy
 
The Evolution of Async-Programming on .NET Platform (.Net China, C#)
The Evolution of Async-Programming on .NET Platform (.Net China, C#)The Evolution of Async-Programming on .NET Platform (.Net China, C#)
The Evolution of Async-Programming on .NET Platform (.Net China, C#)jeffz
 
Build Your Own Tools
Build Your Own ToolsBuild Your Own Tools
Build Your Own Tools
Shugo Maeda
 
Groovy Update - JavaPolis 2007
Groovy Update - JavaPolis 2007Groovy Update - JavaPolis 2007
Groovy Update - JavaPolis 2007
Guillaume Laforge
 
What can be done with Java, but should better be done with Erlang (@pavlobaron)
What can be done with Java, but should better be done with Erlang (@pavlobaron)What can be done with Java, but should better be done with Erlang (@pavlobaron)
What can be done with Java, but should better be done with Erlang (@pavlobaron)
Pavlo Baron
 
Hacking with ruby2ruby
Hacking with ruby2rubyHacking with ruby2ruby
Hacking with ruby2ruby
Marc Chung
 
EuRuKo JRuby Talk 2008
EuRuKo JRuby Talk 2008EuRuKo JRuby Talk 2008
EuRuKo JRuby Talk 2008
geraldbauer
 
Groovy Introduction - JAX Germany - 2008
Groovy Introduction - JAX Germany - 2008Groovy Introduction - JAX Germany - 2008
Groovy Introduction - JAX Germany - 2008
Guillaume Laforge
 
Enterprise JavaScript ... what the heck?
Enterprise JavaScript ... what the heck?Enterprise JavaScript ... what the heck?
Enterprise JavaScript ... what the heck?
Nedelcho Delchev
 
SoTWLG Intro to Code Bootcamps 2016 (Roger Nesbitt)
SoTWLG Intro to Code Bootcamps 2016 (Roger Nesbitt)SoTWLG Intro to Code Bootcamps 2016 (Roger Nesbitt)
SoTWLG Intro to Code Bootcamps 2016 (Roger Nesbitt)
ruthmcdavitt
 
Migrating To Ruby1.9
Migrating To Ruby1.9Migrating To Ruby1.9
Migrating To Ruby1.9tomaspavelka
 
RubyMotion Introduction
RubyMotion IntroductionRubyMotion Introduction
RubyMotion Introduction
Marc Rendl Ignacio
 
Ruby seen by a C# developer
Ruby seen by a C# developerRuby seen by a C# developer
Ruby seen by a C# developer
Emanuele DelBono
 
Ruby seen from a C# developer
Ruby seen from a C# developerRuby seen from a C# developer
Ruby seen from a C# developer
Codemotion
 

Similar to TechDays - IronRuby (20)

Iron Languages - NYC CodeCamp 2/19/2011
Iron Languages - NYC CodeCamp 2/19/2011Iron Languages - NYC CodeCamp 2/19/2011
Iron Languages - NYC CodeCamp 2/19/2011
 
Ruby
RubyRuby
Ruby
 
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
 
Why Ruby?
Why Ruby? Why Ruby?
Why Ruby?
 
4 JVM Web Frameworks
4 JVM Web Frameworks4 JVM Web Frameworks
4 JVM Web Frameworks
 
.NET Foundation, Future of .NET and C#
.NET Foundation, Future of .NET and C#.NET Foundation, Future of .NET and C#
.NET Foundation, Future of .NET and C#
 
The Evolution of Async-Programming on .NET Platform (.Net China, C#)
The Evolution of Async-Programming on .NET Platform (.Net China, C#)The Evolution of Async-Programming on .NET Platform (.Net China, C#)
The Evolution of Async-Programming on .NET Platform (.Net China, C#)
 
Build Your Own Tools
Build Your Own ToolsBuild Your Own Tools
Build Your Own Tools
 
Groovy Update - JavaPolis 2007
Groovy Update - JavaPolis 2007Groovy Update - JavaPolis 2007
Groovy Update - JavaPolis 2007
 
What can be done with Java, but should better be done with Erlang (@pavlobaron)
What can be done with Java, but should better be done with Erlang (@pavlobaron)What can be done with Java, but should better be done with Erlang (@pavlobaron)
What can be done with Java, but should better be done with Erlang (@pavlobaron)
 
Hacking with ruby2ruby
Hacking with ruby2rubyHacking with ruby2ruby
Hacking with ruby2ruby
 
Iron Sprog Tech Talk
Iron Sprog Tech TalkIron Sprog Tech Talk
Iron Sprog Tech Talk
 
EuRuKo JRuby Talk 2008
EuRuKo JRuby Talk 2008EuRuKo JRuby Talk 2008
EuRuKo JRuby Talk 2008
 
Groovy Introduction - JAX Germany - 2008
Groovy Introduction - JAX Germany - 2008Groovy Introduction - JAX Germany - 2008
Groovy Introduction - JAX Germany - 2008
 
Enterprise JavaScript ... what the heck?
Enterprise JavaScript ... what the heck?Enterprise JavaScript ... what the heck?
Enterprise JavaScript ... what the heck?
 
SoTWLG Intro to Code Bootcamps 2016 (Roger Nesbitt)
SoTWLG Intro to Code Bootcamps 2016 (Roger Nesbitt)SoTWLG Intro to Code Bootcamps 2016 (Roger Nesbitt)
SoTWLG Intro to Code Bootcamps 2016 (Roger Nesbitt)
 
Migrating To Ruby1.9
Migrating To Ruby1.9Migrating To Ruby1.9
Migrating To Ruby1.9
 
RubyMotion Introduction
RubyMotion IntroductionRubyMotion Introduction
RubyMotion Introduction
 
Ruby seen by a C# developer
Ruby seen by a C# developerRuby seen by a C# developer
Ruby seen by a C# developer
 
Ruby seen from a C# developer
Ruby seen from a C# developerRuby seen from a C# developer
Ruby seen from a C# developer
 

More from Ben Hall

The Art Of Documentation - NDC Porto 2022
The Art Of Documentation - NDC Porto 2022The Art Of Documentation - NDC Porto 2022
The Art Of Documentation - NDC Porto 2022
Ben Hall
 
The Art Of Documentation for Open Source Projects
The Art Of Documentation for Open Source ProjectsThe Art Of Documentation for Open Source Projects
The Art Of Documentation for Open Source Projects
Ben Hall
 
Three Years of Lessons Running Potentially Malicious Code Inside Containers
Three Years of Lessons Running Potentially Malicious Code Inside ContainersThree Years of Lessons Running Potentially Malicious Code Inside Containers
Three Years of Lessons Running Potentially Malicious Code Inside Containers
Ben Hall
 
Containers without docker
Containers without dockerContainers without docker
Containers without docker
Ben Hall
 
Deploying windows containers with kubernetes
Deploying windows containers with kubernetesDeploying windows containers with kubernetes
Deploying windows containers with kubernetes
Ben Hall
 
The Art of Documentation and Readme.md for Open Source Projects
The Art of Documentation and Readme.md for Open Source ProjectsThe Art of Documentation and Readme.md for Open Source Projects
The Art of Documentation and Readme.md for Open Source Projects
Ben Hall
 
How Secure Are Docker Containers?
How Secure Are Docker Containers?How Secure Are Docker Containers?
How Secure Are Docker Containers?
Ben Hall
 
The Challenges of Becoming Cloud Native
The Challenges of Becoming Cloud NativeThe Challenges of Becoming Cloud Native
The Challenges of Becoming Cloud Native
Ben Hall
 
Scaling Docker Containers using Kubernetes and Azure Container Service
Scaling Docker Containers using Kubernetes and Azure Container ServiceScaling Docker Containers using Kubernetes and Azure Container Service
Scaling Docker Containers using Kubernetes and Azure Container Service
Ben Hall
 
The art of documentation and readme.md
The art of documentation and readme.mdThe art of documentation and readme.md
The art of documentation and readme.md
Ben Hall
 
Experimenting and Learning Kubernetes and Tensorflow
Experimenting and Learning Kubernetes and TensorflowExperimenting and Learning Kubernetes and Tensorflow
Experimenting and Learning Kubernetes and Tensorflow
Ben Hall
 
Running .NET on Docker
Running .NET on DockerRunning .NET on Docker
Running .NET on Docker
Ben Hall
 
Real World Lessons on the Pain Points of Node.JS Application
Real World Lessons on the Pain Points of Node.JS ApplicationReal World Lessons on the Pain Points of Node.JS Application
Real World Lessons on the Pain Points of Node.JS Application
Ben Hall
 
Tips on solving E_TOO_MANY_THINGS_TO_LEARN with Kubernetes
Tips on solving E_TOO_MANY_THINGS_TO_LEARN with KubernetesTips on solving E_TOO_MANY_THINGS_TO_LEARN with Kubernetes
Tips on solving E_TOO_MANY_THINGS_TO_LEARN with Kubernetes
Ben Hall
 
Deploying applications to Windows Server 2016 and Windows Containers
Deploying applications to Windows Server 2016 and Windows ContainersDeploying applications to Windows Server 2016 and Windows Containers
Deploying applications to Windows Server 2016 and Windows Containers
Ben Hall
 
The How and Why of Windows containers
The How and Why of Windows containersThe How and Why of Windows containers
The How and Why of Windows containers
Ben Hall
 
Lessons from running potentially malicious code inside containers
Lessons from running potentially malicious code inside containersLessons from running potentially malicious code inside containers
Lessons from running potentially malicious code inside containers
Ben Hall
 
Deploying Windows Containers on Windows Server 2016
Deploying Windows Containers on Windows Server 2016Deploying Windows Containers on Windows Server 2016
Deploying Windows Containers on Windows Server 2016
Ben Hall
 
Learning Patterns for the Overworked Developer
Learning Patterns for the Overworked DeveloperLearning Patterns for the Overworked Developer
Learning Patterns for the Overworked Developer
Ben Hall
 
Real World Lessons on the Pain Points of Node.js Applications
Real World Lessons on the Pain Points of Node.js ApplicationsReal World Lessons on the Pain Points of Node.js Applications
Real World Lessons on the Pain Points of Node.js Applications
Ben Hall
 

More from Ben Hall (20)

The Art Of Documentation - NDC Porto 2022
The Art Of Documentation - NDC Porto 2022The Art Of Documentation - NDC Porto 2022
The Art Of Documentation - NDC Porto 2022
 
The Art Of Documentation for Open Source Projects
The Art Of Documentation for Open Source ProjectsThe Art Of Documentation for Open Source Projects
The Art Of Documentation for Open Source Projects
 
Three Years of Lessons Running Potentially Malicious Code Inside Containers
Three Years of Lessons Running Potentially Malicious Code Inside ContainersThree Years of Lessons Running Potentially Malicious Code Inside Containers
Three Years of Lessons Running Potentially Malicious Code Inside Containers
 
Containers without docker
Containers without dockerContainers without docker
Containers without docker
 
Deploying windows containers with kubernetes
Deploying windows containers with kubernetesDeploying windows containers with kubernetes
Deploying windows containers with kubernetes
 
The Art of Documentation and Readme.md for Open Source Projects
The Art of Documentation and Readme.md for Open Source ProjectsThe Art of Documentation and Readme.md for Open Source Projects
The Art of Documentation and Readme.md for Open Source Projects
 
How Secure Are Docker Containers?
How Secure Are Docker Containers?How Secure Are Docker Containers?
How Secure Are Docker Containers?
 
The Challenges of Becoming Cloud Native
The Challenges of Becoming Cloud NativeThe Challenges of Becoming Cloud Native
The Challenges of Becoming Cloud Native
 
Scaling Docker Containers using Kubernetes and Azure Container Service
Scaling Docker Containers using Kubernetes and Azure Container ServiceScaling Docker Containers using Kubernetes and Azure Container Service
Scaling Docker Containers using Kubernetes and Azure Container Service
 
The art of documentation and readme.md
The art of documentation and readme.mdThe art of documentation and readme.md
The art of documentation and readme.md
 
Experimenting and Learning Kubernetes and Tensorflow
Experimenting and Learning Kubernetes and TensorflowExperimenting and Learning Kubernetes and Tensorflow
Experimenting and Learning Kubernetes and Tensorflow
 
Running .NET on Docker
Running .NET on DockerRunning .NET on Docker
Running .NET on Docker
 
Real World Lessons on the Pain Points of Node.JS Application
Real World Lessons on the Pain Points of Node.JS ApplicationReal World Lessons on the Pain Points of Node.JS Application
Real World Lessons on the Pain Points of Node.JS Application
 
Tips on solving E_TOO_MANY_THINGS_TO_LEARN with Kubernetes
Tips on solving E_TOO_MANY_THINGS_TO_LEARN with KubernetesTips on solving E_TOO_MANY_THINGS_TO_LEARN with Kubernetes
Tips on solving E_TOO_MANY_THINGS_TO_LEARN with Kubernetes
 
Deploying applications to Windows Server 2016 and Windows Containers
Deploying applications to Windows Server 2016 and Windows ContainersDeploying applications to Windows Server 2016 and Windows Containers
Deploying applications to Windows Server 2016 and Windows Containers
 
The How and Why of Windows containers
The How and Why of Windows containersThe How and Why of Windows containers
The How and Why of Windows containers
 
Lessons from running potentially malicious code inside containers
Lessons from running potentially malicious code inside containersLessons from running potentially malicious code inside containers
Lessons from running potentially malicious code inside containers
 
Deploying Windows Containers on Windows Server 2016
Deploying Windows Containers on Windows Server 2016Deploying Windows Containers on Windows Server 2016
Deploying Windows Containers on Windows Server 2016
 
Learning Patterns for the Overworked Developer
Learning Patterns for the Overworked DeveloperLearning Patterns for the Overworked Developer
Learning Patterns for the Overworked Developer
 
Real World Lessons on the Pain Points of Node.js Applications
Real World Lessons on the Pain Points of Node.js ApplicationsReal World Lessons on the Pain Points of Node.js Applications
Real World Lessons on the Pain Points of Node.js Applications
 

TechDays - IronRuby

  • 1. IronRuby – A brave new world for .Net @Ben_Hall, Developerester, 7digital.com Ben@BenHall.me.uk Blog.BenHall.me.uk CodeBetter.com/blogs/BenHall
  • 2. London (UK) based C# MVPWeb Developer @ 7digital.com Working on a number of Open Source Projects Co-Author of Testing ASP.net Web Applications http://www.testingaspnet.com
  • 3. Agenda Ruby IronRuby DLR Merging IronRuby and C#
  • 6. Right language for the right job
  • 7. Everything is an object “Hello World”.upcase [5,3,4,1,6].sort 10.times { |i| puts “Loop count: #{i}” }
  • 8. Blocks 10.times do |i| puts “Loop count: #{i}” end Loop count: 0 Loop count: 1 Loop count: 2 Loop count: 3 Loop count: 4 Loop count: 5 Loop count: 6 Loop count: 7 Loop count: 8 Loop count: 9
  • 9. Blocks search_engines =   %W[Google Yahoo Bing].map do |engine|    "http://www.#{engine.downcase}.com"  end search_engines = [ ‘http://www.google.com’, ‘http://www.yahoo.com’, ‘http://www.bing.com’ ]
  • 10. Natural Programming x = [1,2,3] y = [4,5,6] >>> x + y => [1,2,3,4,5,6]
  • 11. Duck Typing # Message sends itself via some transport protocol class Message def publish(transport) puts transport.send(self) end end http://www.flickr.com/photos/normis/337183421/
  • 12. Duck Typing class Queue def send(message) @server.open @server.issue(message) @server.close end end
  • 13. Duck Typing class SmtpService def send(message) @service.post(message) end end
  • 14. Duck Typing m = Message.new m.subject = “Hello TechDays!” q = Queue.new s = SmtpService.new m.publish(q) m.publish(s)
  • 15. Duck Typing class Postman def send(message) phone_number = 012398622 @john.call(phone_number) end end m.publish(Postman.new)
  • 16. Mixins class ProductPage < CMS::BasePage include Editable    includeThemeable includeDroppableCustomisations end
  • 17. Extendable class Fixnum def odd?() !even? end def even?() self % 2 == 0 end end >>> 1.odd? => true >>> 1.even? => false >>> 2.odd? => false >>> 2.even? => true
  • 18. Blended of multiple languages
  • 19. “Ruby is simple in appearance, but is very complex inside, just like our human body” Yukihiro “matz” Matsumoto – Creator of Ruby
  • 20. “trying to make Ruby natural, not simple” Yukihiro “matz” Matsumoto – Creator of Ruby
  • 21. Frameworks Rails (Web) ActiveRecord (ORM) Sinatra (Web) RSpec (BDD Unit Testing) Cucumber (Acceptance Testing)
  • 22. If that’s Ruby What’s IronRuby? http://www.flickr.com/photos/bflv/3328427869/
  • 23. DEMOs
  • 24. Static language => Dynamic language http://github.com/BenHall/IronRuby_CSharp_Type_Interop
  • 25. Ruby Frameworks - Exposing NHibernate domain model in a ‘RESTful’ way http://github.com/BenHall/IronRestfulRails
  • 26. @post = r.GetPost("PostID", params[:id].to_i)class PostRepository def method_missing(m, *args)columnName = m.id2name.sub(/find_by_/, "")get_postcolumnName, *args endend@post = r.find_by_PostID 1@post = r.find_by_Title “Post 1" http://github.com/BenHall/IronRestfulRails
  • 27. Ruby Frameworks - erb http://github.com/BenHall/IronRuby_Erb_Templating
  • 29. C# Frameworks - MeerPush http://github.com/BenHall/MeerPush
  • 30. What is the DLR? http://www.flickr.com/photos/lastrounds/3199561205/sizes/o/
  • 32. Combing the two worlds http://www.flickr.com/photos/mendhak/2117622450/sizes/o/
  • 33. Embedding IronRuby into C# http://github.com/BenHall/EmbeddedIronRuby
  • 34. Extending C# applications using Ruby and MEF http://github.com/BenHall/ExtendViaMEF
  • 38. C# 4.0 - dynamic static void Main(string[] args) { Console.WriteLine("Executing from C#"); ScriptRuntime runtime = IronRuby.Ruby.CreateRuntime(); ScriptScope scope = runtime.ExecuteFile("person.rb"); dynamic person = scope.Engine.Execute("Person.new"); person.say_hello(); Console.ReadLine(); } Program.cs person.rb class Person def say_hello puts "Hello world from IronRuby!" end end http://github.com/BenHall/IronRuby_CSharp_4
  • 39. Testing C# applications http://github.com/BenHall/wipflash_cucumber_driven_example
  • 41. How will the DLR change your world?
  • 42. @Ben_Hall Ben@BenHall.me.uk Blog.BenHall.me.uk http://lolcatgenerator.com/lolcat/120/
  • 43. Utvärdera gärna sessionen. Dina synpunkter är mycket värdefulla för oss. Därför är vi mycket tacksamma för att du tar dig någon minut att utvärdera den session som du just har lyssnat på. Besök din MINT-profil* i din mobil, gå till dina sessioner och klicka på ”utvärdera”. In English: Your feedback is very valuable to us. Therefore, we are very grateful that you take a minute to evaluate the session that you just listened to. Tack! *MINT är en mobil tjänst för evenemang och möten som bland annan erbjuder dig möjligheten att utvärdera de sessioner du besöker direkt i din mobil. Om du saknar mobil eller inte kan komma åt MINT av annan anledning har vi fysiska utvärderingar i pappersform.

Editor's Notes

  1. Dynamic language
  2. Static &gt; Dynamic. Dynamic are more flexible, can adapt the applications frameworks to fit your requirements. Produce similar results, cleaner code and provide a nicer experience for developers. As a result, the code is easier to maintain. Ruby community – testable, clean, natural, expressive =&gt; open source
  3. Git branch master (demo)Git branch to_json_via_ruby (monkey patch)
  4. http://www.flickr.com/photos/lastrounds/3199561205/sizes/o/
  5. C:UsersBen HallDocumentsSourceControlEmbeddedIronRubyGit branch demoGit branch master (complete)
  6. C:UsersBen HallDocumentsSourceControlMEFEnabledGit branch master (demo)Git branch with_ruby (complete)