SlideShare a Scribd company logo
JRUBY
A Better Java and A Better Ruby - by Vagmi Mudumbai
Who am I


http://www.dharanasoft.com




RailsPundit
http://www.railspundit.com
I hack on




Follow me @vagmi
Dynamically Typed

MyCollection<IMyInteface> myCollection = new MyCollection<IMyInterface>()




                    my_collection = MyCollection.new




                         Follow me @vagmi
Multi Paradigm Language




         Follow me @vagmi
Meta programming


                         You just have to realize
                           There is no spoon!




      Follow me @vagmi
Talk is cheap.
     Show me the code.
Follow me @vagmi
Object Orientation
5.class

=> Fixnum
                                 class Sample
class Sample
                                         def hello2
  def hello
                                           puts “hello2”
      puts “hello”
                                         end
  end
                                 end
end
                                 obj.hello2
obj = Sample.new

obj.hello




                      Follow me @vagmi
Object Orientation
                                class << obj2

                                        def hello3
obj2 = Sample.new
                                          puts “hello3”
obj2.hello1
                                        end
hello
                                end
=> nil
                                obj2.hello3
obj2.hello2
                                hello3
hello2
                                => nil
=> nil
                                obj.hello3

                                # error occurs




                     Follow me @vagmi
Data Types

a = [1,2,3,”hello”,[‘a’,’b’,’c’]

a << “another object”                         hsh = {}

a[4]                                          hsh = {“a”=>1, “b”=>2}

=> “hello”                                    hsh = {“asdf”=>1,2=>”asdf”}

a[4]                                          hsh[a] = “key can be anything”

=>[‘a’,’b’,’c’]




                                   Follow me @vagmi
Data Types
“asdf”.object_id

=>id1

“asdf”.object_id

=>id2

                                         to the rescue
           Strings are mu table. Symbols
                                :”asdf”.object_id

                                => id3

                                :”asdf”.object_id

                                => id3

                                :asdf.object_id

                                => id3

                             Follow me @vagmi
Blocks




        Ruby has no for statement

 Follow me @vagmi
Blocks

[1,2,3,4].each do |i|

    puts (i*2).to_s                 def measure_it(&block)

end                                         puts Time.now

2                                           yield

4                                           puts Time.now

6                                   end

8




                         Follow me @vagmi
But why JRuby


quartz-jruby

  http://blog.dharanasoft.com/2010/12/03/scheduling-
  jobs-with-jruby/



                       Follow me @vagmi
Introducing Rails




      Follow me @vagmi
Lets build a Rails App




         Follow me @vagmi
Questions

            Follow me now
               @vagmi

More Related Content

PDF
JRuby @ Boulder Ruby
PDF
Mastering the MongoDB Shell
PPT
Introduction to Ruby, Rails, and Ruby on Rails
PDF
Voyage by example
PDF
Self, Class and Module
PPTX
Oop Game Programming Concept
PDF
Exploring Ceylon with Gavin King - JUG BB Talk - Belrin 2014
JRuby @ Boulder Ruby
Mastering the MongoDB Shell
Introduction to Ruby, Rails, and Ruby on Rails
Voyage by example
Self, Class and Module
Oop Game Programming Concept
Exploring Ceylon with Gavin King - JUG BB Talk - Belrin 2014

What's hot (18)

KEY
JavaScript Neednt Hurt - JavaBin talk
PDF
JS Level Up: Prototypes
PDF
Ruby Programming Language
PPTX
iSoligorsk #3 2013
PDF
Introduction to Moose
PDF
JavaScript - From Birth To Closure
PDF
Introduction to clojure
PPTX
CoffeeScript - An Introduction
PPT
Class
PPT
Memory Leaks In Internet Explorer
PDF
OO Perl with Moose
PPT
Floggy-M3DD-2009-01-21
PDF
Object Oriented Programming in JavaScript
ODP
Moose talk at FOSDEM 2011 (Perl devroom)
PDF
Objects, Objects Everywhere
PDF
Why is Haskell so hard! (And how to deal with it?)
ODP
Moose (Perl 5)
PDF
Ruby 101
JavaScript Neednt Hurt - JavaBin talk
JS Level Up: Prototypes
Ruby Programming Language
iSoligorsk #3 2013
Introduction to Moose
JavaScript - From Birth To Closure
Introduction to clojure
CoffeeScript - An Introduction
Class
Memory Leaks In Internet Explorer
OO Perl with Moose
Floggy-M3DD-2009-01-21
Object Oriented Programming in JavaScript
Moose talk at FOSDEM 2011 (Perl devroom)
Objects, Objects Everywhere
Why is Haskell so hard! (And how to deal with it?)
Moose (Perl 5)
Ruby 101
Ad

Viewers also liked (15)

PDF
JSFoo 2014 - Building beautiful apps with Clojurescript
KEY
Github - Down the Rabbit Hole
PDF
Print maths loop games (print)
PDF
Purely functional UIs
PPTX
Blog zero-to-blog-hero
PDF
PPTX
Life expectancy
PDF
Real Time Analytics with Cassandra
PDF
Pragmatic Functional Programming in the JS land with Clojurescript and Om
KEY
MongoDB - Introduction
KEY
Building Single Page Apps with Backbone.js, Coffeescript and Rails 3.1
PDF
Crystal - Statically Typed Ruby
PPSX
Globalisation
PDF
Building Single Page Apps with React.JS
PDF
Ruby on Rails - Introduction
JSFoo 2014 - Building beautiful apps with Clojurescript
Github - Down the Rabbit Hole
Print maths loop games (print)
Purely functional UIs
Blog zero-to-blog-hero
Life expectancy
Real Time Analytics with Cassandra
Pragmatic Functional Programming in the JS land with Clojurescript and Om
MongoDB - Introduction
Building Single Page Apps with Backbone.js, Coffeescript and Rails 3.1
Crystal - Statically Typed Ruby
Globalisation
Building Single Page Apps with React.JS
Ruby on Rails - Introduction
Ad

Similar to Introduction to JRuby (20)

PDF
Introduction to Ruby
PDF
Ruby 程式語言入門導覽
KEY
Ruby objects
KEY
Desarrollando aplicaciones web en minutos
KEY
jRuby: The best of both worlds
PDF
Introduction to Ruby Programming Language
KEY
Introducing Ruby
PDF
Learning Ruby
PDF
Slides chapter3part1 ruby-forjavaprogrammers
PDF
Ruby 入門 第一次就上手
PDF
Ruby Language - A quick tour
PDF
Ruby training day1
PPT
Ruby: OOP, metaprogramming, blocks, iterators, mix-ins, duck typing. Code style
KEY
Rails by example
KEY
ODP
Ruby Basics by Rafiq
PDF
Ruby on Rails
PPTX
Ruby data types and objects
PDF
Ruby — An introduction
Introduction to Ruby
Ruby 程式語言入門導覽
Ruby objects
Desarrollando aplicaciones web en minutos
jRuby: The best of both worlds
Introduction to Ruby Programming Language
Introducing Ruby
Learning Ruby
Slides chapter3part1 ruby-forjavaprogrammers
Ruby 入門 第一次就上手
Ruby Language - A quick tour
Ruby training day1
Ruby: OOP, metaprogramming, blocks, iterators, mix-ins, duck typing. Code style
Rails by example
Ruby Basics by Rafiq
Ruby on Rails
Ruby data types and objects
Ruby — An introduction

Recently uploaded (20)

PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
Empathic Computing: Creating Shared Understanding
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
Review of recent advances in non-invasive hemoglobin estimation
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
Encapsulation theory and applications.pdf
PDF
Machine learning based COVID-19 study performance prediction
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
Chapter 3 Spatial Domain Image Processing.pdf
DOCX
The AUB Centre for AI in Media Proposal.docx
PPT
Teaching material agriculture food technology
PPTX
Big Data Technologies - Introduction.pptx
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Spectral efficient network and resource selection model in 5G networks
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Empathic Computing: Creating Shared Understanding
Per capita expenditure prediction using model stacking based on satellite ima...
Review of recent advances in non-invasive hemoglobin estimation
Understanding_Digital_Forensics_Presentation.pptx
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Encapsulation theory and applications.pdf
Machine learning based COVID-19 study performance prediction
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Diabetes mellitus diagnosis method based random forest with bat algorithm
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Chapter 3 Spatial Domain Image Processing.pdf
The AUB Centre for AI in Media Proposal.docx
Teaching material agriculture food technology
Big Data Technologies - Introduction.pptx
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Spectral efficient network and resource selection model in 5G networks
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...

Introduction to JRuby

Editor's Notes