SlideShare a Scribd company logo
1 of 23
Download to read offline
JRuby in Action




                Ruby, Rails, GUIs, and More




Except where otherwise noted, the content of this presentation is licensed under 
the Creative Commons Attribution­Share Alike 3.0 United States License (http://creativecommons.org/licenses/by­sa/3.0/us/).
The JRuby Guys
●   Charles Oliver Nutter and Thomas Enebo
●   JRuby for 4+ years
●   Sun Microsystems for 2+ years
●   JVM languages
Ruby
●   Dynamically typed
●   Pure object-oriented
●   C-language implementation
    ●   Green threads
    ●   “Fast enough” == “a bit slow”
●   1.8.6/7 is current
●   1.9 in development
    ●   Focus on performance, character encodings
JRuby
●   Ruby on the JVM
●   Nearly complete Ruby compatibility
●   Interop with Java libraries
●   Improvements on original
    ●   Native threading
    ●   Faster by most measurements
●   1.1.6 this week (RC1 out now)
●   1.8.6 compatible, 1.9 in progress
Ruby Tutorial
●   Walkthrough of all the key Ruby features
●   Interactive! Please jump in with questions
●   Free-form, live-coded
●   Ruby is fun, Ruby tutorial should be fun!
Modules

             Object




          MyGreatClass



class MyGreatClass < Object
 …
end
Modules
             Object




         MyGreatModule




          MyGreatClass




class MyGreatClass < Object
 include MyGreatModule
end
Modules
                                   Class
                                   class



   Object                       Object
   class                       meta class



MyGreatClass                  MyGreatClass
   class                       meta class



     class MyGreatClass < Object
      extend MyGreatModule
     end
Modules
                                Object
   Object
                               Meta class




                             MyGreatModule




                              MyGreatClass
MyGreatClass
                               Meta class



     class MyGreatClass < Object
      extend MyGreatModule
     end
Singletons

                               Object




my_object                MyGreatClass




class MyGreatClass
end

my_object = MyGreatClass.new
Singletons
                               Object




                         MyGreatClass




                         MyGreatClass
my_object
                         singleton class


class MyGreatClass
end

my_object = MyGreatClass.new
class << my_object
end
More Cool Ruby: FFI
●   Foreign Function Interface
●   Call C libraries from Ruby code
●   Works on Ruby and JRuby
●   Map simple types, structs, callbacks
●   DSL for function binding
JVMScript (working title)
●   A DSL for generating JVM bytecode
●   Multiple Ruby techniques employed
●   Goal: structured assembly for JVM
What is Ruby on Rails?
●   A Full-stack MVC web development framework
●   Open Source (MIT), Many Contributors
●   Written in Ruby
●   Single-Threaded design (2.2 has MT-mode)
●   First released in 2004 by David Heinemeier Hansson
●   Super-hyped! :)   :(
Rails Precepts
●   Convention over Configuration
    ●   Why punish the common cases?
    ●   Encourages standard practices
    ●   Everything simpler and smaller
●   Don't Repeat Yourself (DRY)
    ●   Framework written around minimizing repetition
    ●   Repetitive code harmful to adaptability
●   Agile Development Environment
    ●   No recompile, deploy, restart cycles
    ●   Simple tools to generate code quickly
    ●   Testing built into framework
Why Rails?
●   Greatly simplified web development
    ●   “Less Rails code than Java app configuration”
    ●   Instant applications: working code in minutes
●   Makes small apps trivial to create
●   Ruby is an excellent language
●   Still growing in popularity in leaps and bounds
The Rails Stack
●   ActiveRecord
    ●   ORM on steroids
●   ActionPack
    ●   View and controller support
●   ActiveResource
    ●   Restful resources
●   Actionmailer
    ●   Email
●   Activesupport
    ●   Unicode, json, miscellaneous helpers
Rails Demo




Let's write a simple blog app
JRuby on Rails
●   Java is Everywhere
    ●   Every OS/Hardware platform you can think of
    ●   Probably already on a server near you
●   Less political resistance
    ●   “JRuby is just another Jar file”
    ●   No need to install additional software on your servers
●   Wider database support
●   Decent performance
JRuby on Rails (Warbler)
●   Java-style deployment to Application Server
●   Bundles a Rails application into a WAR file
●   Hand WAR file to production staff
●   Rails App deployed!

                                          Rack




       http://wiki.jruby.org/wiki/JRuby_Rack
JRuby on Rails (GlassFish v3 gem)
●   Entire App Server in a 4Mb gem
●   Ruby-style deployment to GF Application Server
    ●   gem install glassfish
    ●   glassfish <Rails app dir>
●   Configurable number of listeners all in one process
●   Under active development



                                            GlassFish
Parts is Parts
●   Script Java technology you need into your Rails app
    ●   Call “legacy” Java from existing project
    ●   Get additional choices
Swing GUI in JRuby
●   Builder approach (ex: Rubeus)
    ●   Sort of a “model 1” 1998 JSP approach
    ●   Great for simple forms
    ●   Difficult for long-term, large apps
●   Tool-driven approach (ex: MonkeyBars)
    ●   Tool manages UI layout
    ●   Logic is MVC-driven
    ●   UI and logic evolved, maintained separately
    ●   Easier to scale to large apps

More Related Content

What's hot

JavaScript Roadmap III - ECMAScript
JavaScript Roadmap III - ECMAScriptJavaScript Roadmap III - ECMAScript
JavaScript Roadmap III - ECMAScriptAswin Barath
 
Javantura 2014 - Java 8 JavaScript Nashorn
Javantura 2014 - Java 8 JavaScript NashornJavantura 2014 - Java 8 JavaScript Nashorn
Javantura 2014 - Java 8 JavaScript NashornMiroslav Resetar
 
JRuby - Programmer's Best Friend on JVM
JRuby - Programmer's Best Friend on JVMJRuby - Programmer's Best Friend on JVM
JRuby - Programmer's Best Friend on JVMRaimonds Simanovskis
 
Node.js Course 1 of 2 - Introduction and first steps
Node.js Course 1 of 2 - Introduction and first stepsNode.js Course 1 of 2 - Introduction and first steps
Node.js Course 1 of 2 - Introduction and first stepsManuel Eusebio de Paz Carmona
 
React web development
React web developmentReact web development
React web developmentRully Ramanda
 
Java (advanced and core)online training in Hyderabad|course content
Java (advanced and core)online training in Hyderabad|course contentJava (advanced and core)online training in Hyderabad|course content
Java (advanced and core)online training in Hyderabad|course contentRS Trainings
 
Introduction to Java 7 (OSCON 2012)
Introduction to Java 7 (OSCON 2012)Introduction to Java 7 (OSCON 2012)
Introduction to Java 7 (OSCON 2012)Martijn Verburg
 
SELF - Becoming a Rails Developer - The Rest of the Story
SELF - Becoming a Rails Developer - The Rest of the StorySELF - Becoming a Rails Developer - The Rest of the Story
SELF - Becoming a Rails Developer - The Rest of the StoryNathanial McConnell
 
The Bleeding Edge
The Bleeding EdgeThe Bleeding Edge
The Bleeding EdgejClarity
 
Node.js, toy or power tool?
Node.js, toy or power tool?Node.js, toy or power tool?
Node.js, toy or power tool?Ovidiu Dimulescu
 
Ruby on rails探索
Ruby on rails探索Ruby on rails探索
Ruby on rails探索Mu Chun Wang
 
Porting 100k Lines of Code to TypeScript
Porting 100k Lines of Code to TypeScriptPorting 100k Lines of Code to TypeScript
Porting 100k Lines of Code to TypeScriptTiny
 
Green Custard Friday Talk 5: React-Native Performance
Green Custard Friday Talk 5: React-Native PerformanceGreen Custard Friday Talk 5: React-Native Performance
Green Custard Friday Talk 5: React-Native PerformanceGreen Custard
 
Ruby JIT Compilation - Mykhail Bortnyk
Ruby JIT Compilation - Mykhail Bortnyk Ruby JIT Compilation - Mykhail Bortnyk
Ruby JIT Compilation - Mykhail Bortnyk Ruby Meditation
 

What's hot (20)

JavaScript Roadmap III - ECMAScript
JavaScript Roadmap III - ECMAScriptJavaScript Roadmap III - ECMAScript
JavaScript Roadmap III - ECMAScript
 
Javantura 2014 - Java 8 JavaScript Nashorn
Javantura 2014 - Java 8 JavaScript NashornJavantura 2014 - Java 8 JavaScript Nashorn
Javantura 2014 - Java 8 JavaScript Nashorn
 
JRuby - Programmer's Best Friend on JVM
JRuby - Programmer's Best Friend on JVMJRuby - Programmer's Best Friend on JVM
JRuby - Programmer's Best Friend on JVM
 
Node.js Course 1 of 2 - Introduction and first steps
Node.js Course 1 of 2 - Introduction and first stepsNode.js Course 1 of 2 - Introduction and first steps
Node.js Course 1 of 2 - Introduction and first steps
 
Node.js an Exectutive View
Node.js an Exectutive ViewNode.js an Exectutive View
Node.js an Exectutive View
 
Node.js Course 2 of 2 - Advanced techniques
Node.js Course 2 of 2 - Advanced techniquesNode.js Course 2 of 2 - Advanced techniques
Node.js Course 2 of 2 - Advanced techniques
 
Introduction to node.js
Introduction to node.jsIntroduction to node.js
Introduction to node.js
 
React web development
React web developmentReact web development
React web development
 
Java (advanced and core)online training in Hyderabad|course content
Java (advanced and core)online training in Hyderabad|course contentJava (advanced and core)online training in Hyderabad|course content
Java (advanced and core)online training in Hyderabad|course content
 
TypeScript
TypeScriptTypeScript
TypeScript
 
Node js crash course session 1
Node js crash course   session 1Node js crash course   session 1
Node js crash course session 1
 
Introduction to Java 7 (OSCON 2012)
Introduction to Java 7 (OSCON 2012)Introduction to Java 7 (OSCON 2012)
Introduction to Java 7 (OSCON 2012)
 
SELF - Becoming a Rails Developer - The Rest of the Story
SELF - Becoming a Rails Developer - The Rest of the StorySELF - Becoming a Rails Developer - The Rest of the Story
SELF - Becoming a Rails Developer - The Rest of the Story
 
Intro to nodejs
Intro to nodejsIntro to nodejs
Intro to nodejs
 
The Bleeding Edge
The Bleeding EdgeThe Bleeding Edge
The Bleeding Edge
 
Node.js, toy or power tool?
Node.js, toy or power tool?Node.js, toy or power tool?
Node.js, toy or power tool?
 
Ruby on rails探索
Ruby on rails探索Ruby on rails探索
Ruby on rails探索
 
Porting 100k Lines of Code to TypeScript
Porting 100k Lines of Code to TypeScriptPorting 100k Lines of Code to TypeScript
Porting 100k Lines of Code to TypeScript
 
Green Custard Friday Talk 5: React-Native Performance
Green Custard Friday Talk 5: React-Native PerformanceGreen Custard Friday Talk 5: React-Native Performance
Green Custard Friday Talk 5: React-Native Performance
 
Ruby JIT Compilation - Mykhail Bortnyk
Ruby JIT Compilation - Mykhail Bortnyk Ruby JIT Compilation - Mykhail Bortnyk
Ruby JIT Compilation - Mykhail Bortnyk
 

Viewers also liked

Circolare 32 21 Giugno 2005
Circolare 32 21 Giugno 2005Circolare 32 21 Giugno 2005
Circolare 32 21 Giugno 2005gianlkr
 
SW_Documentation_GRASS
SW_Documentation_GRASSSW_Documentation_GRASS
SW_Documentation_GRASStutorialsruby
 
Jdbc中驱动加载的过程分析(上)
Jdbc中驱动加载的过程分析(上)Jdbc中驱动加载的过程分析(上)
Jdbc中驱动加载的过程分析(上)yiditushe
 
给学习J2 Ee的朋友一些值得研究的开源项目
给学习J2 Ee的朋友一些值得研究的开源项目给学习J2 Ee的朋友一些值得研究的开源项目
给学习J2 Ee的朋友一些值得研究的开源项目yiditushe
 
Gita Study Nov 9 Dr. Shriniwas J. Kashalikar
Gita Study Nov 9 Dr. Shriniwas J. KashalikarGita Study Nov 9 Dr. Shriniwas J. Kashalikar
Gita Study Nov 9 Dr. Shriniwas J. Kashalikardrsolapurkar
 
Content Outside of CONTENTdm: Part 1: Exhibit Creation Tool using &lt;b>...&l...
Content Outside of CONTENTdm: Part 1: Exhibit Creation Tool using &lt;b>...&l...Content Outside of CONTENTdm: Part 1: Exhibit Creation Tool using &lt;b>...&l...
Content Outside of CONTENTdm: Part 1: Exhibit Creation Tool using &lt;b>...&l...tutorialsruby
 
Receitas com castanhas
Receitas com castanhasReceitas com castanhas
Receitas com castanhasPaula Morgado
 
ruby_vs_perl_and_python
ruby_vs_perl_and_pythonruby_vs_perl_and_python
ruby_vs_perl_and_pythontutorialsruby
 
Viral Marketing v praxi by ZARAGUZA .Com
Viral Marketing v praxi by ZARAGUZA .ComViral Marketing v praxi by ZARAGUZA .Com
Viral Marketing v praxi by ZARAGUZA .ComZARAGUZA DIGITAL
 

Viewers also liked (20)

Circolare 32 21 Giugno 2005
Circolare 32 21 Giugno 2005Circolare 32 21 Giugno 2005
Circolare 32 21 Giugno 2005
 
SW_Documentation_GRASS
SW_Documentation_GRASSSW_Documentation_GRASS
SW_Documentation_GRASS
 
newperl5
newperl5newperl5
newperl5
 
Using Internet Technology for Learning
Using Internet Technology for LearningUsing Internet Technology for Learning
Using Internet Technology for Learning
 
Lecture19-20
Lecture19-20Lecture19-20
Lecture19-20
 
Jdbc中驱动加载的过程分析(上)
Jdbc中驱动加载的过程分析(上)Jdbc中驱动加载的过程分析(上)
Jdbc中驱动加载的过程分析(上)
 
给学习J2 Ee的朋友一些值得研究的开源项目
给学习J2 Ee的朋友一些值得研究的开源项目给学习J2 Ee的朋友一些值得研究的开源项目
给学习J2 Ee的朋友一些值得研究的开源项目
 
sample-06
sample-06sample-06
sample-06
 
Gita Study Nov 9 Dr. Shriniwas J. Kashalikar
Gita Study Nov 9 Dr. Shriniwas J. KashalikarGita Study Nov 9 Dr. Shriniwas J. Kashalikar
Gita Study Nov 9 Dr. Shriniwas J. Kashalikar
 
FrontMatter
FrontMatterFrontMatter
FrontMatter
 
Content Outside of CONTENTdm: Part 1: Exhibit Creation Tool using &lt;b>...&l...
Content Outside of CONTENTdm: Part 1: Exhibit Creation Tool using &lt;b>...&l...Content Outside of CONTENTdm: Part 1: Exhibit Creation Tool using &lt;b>...&l...
Content Outside of CONTENTdm: Part 1: Exhibit Creation Tool using &lt;b>...&l...
 
Receitas com castanhas
Receitas com castanhasReceitas com castanhas
Receitas com castanhas
 
INFS730
INFS730INFS730
INFS730
 
La Investigacion En El Proceso
La Investigacion En El ProcesoLa Investigacion En El Proceso
La Investigacion En El Proceso
 
ruby-cocoa
ruby-cocoaruby-cocoa
ruby-cocoa
 
ruby_vs_perl_and_python
ruby_vs_perl_and_pythonruby_vs_perl_and_python
ruby_vs_perl_and_python
 
Viral Marketing v praxi by ZARAGUZA .Com
Viral Marketing v praxi by ZARAGUZA .ComViral Marketing v praxi by ZARAGUZA .Com
Viral Marketing v praxi by ZARAGUZA .Com
 
Dojo1.0_Tutorials
Dojo1.0_TutorialsDojo1.0_Tutorials
Dojo1.0_Tutorials
 
PCCNews0609
PCCNews0609PCCNews0609
PCCNews0609
 
netbeans
netbeansnetbeans
netbeans
 

Similar to Devoxx%202008%20Tutorial

Dynamic Languages on the JVM
Dynamic Languages on the JVMDynamic Languages on the JVM
Dynamic Languages on the JVMelliando dias
 
Exploring Ruby on Rails and PostgreSQL
Exploring Ruby on Rails and PostgreSQLExploring Ruby on Rails and PostgreSQL
Exploring Ruby on Rails and PostgreSQLBarry Jones
 
Javascript Best Practices and Intro to Titanium
Javascript Best Practices and Intro to TitaniumJavascript Best Practices and Intro to Titanium
Javascript Best Practices and Intro to TitaniumTechday7
 
Introduction to JRuby
Introduction to JRubyIntroduction to JRuby
Introduction to JRubyelliando dias
 
Gradle.Enemy at the gates
Gradle.Enemy at the gatesGradle.Enemy at the gates
Gradle.Enemy at the gatesStrannik_2013
 
Polyglot and Functional Programming (OSCON 2012)
Polyglot and Functional Programming (OSCON 2012)Polyglot and Functional Programming (OSCON 2012)
Polyglot and Functional Programming (OSCON 2012)Martijn Verburg
 
Bitter Java, Sweeten with JRuby
Bitter Java, Sweeten with JRubyBitter Java, Sweeten with JRuby
Bitter Java, Sweeten with JRubyBrian Sam-Bodden
 
JRuby in a Java World
JRuby in a Java WorldJRuby in a Java World
JRuby in a Java WorldMark Menard
 
Session 02 - Elements of Java Language
Session 02 - Elements of Java LanguageSession 02 - Elements of Java Language
Session 02 - Elements of Java LanguagePawanMM
 
Introduction to the wonderful world of JavaScript
Introduction to the wonderful world of JavaScriptIntroduction to the wonderful world of JavaScript
Introduction to the wonderful world of JavaScriptJakob Torp
 
Ruby Metaprogramming - OSCON 2008
Ruby Metaprogramming - OSCON 2008Ruby Metaprogramming - OSCON 2008
Ruby Metaprogramming - OSCON 2008Brian Sam-Bodden
 

Similar to Devoxx%202008%20Tutorial (20)

Dynamic Languages on the JVM
Dynamic Languages on the JVMDynamic Languages on the JVM
Dynamic Languages on the JVM
 
Exploring Ruby on Rails and PostgreSQL
Exploring Ruby on Rails and PostgreSQLExploring Ruby on Rails and PostgreSQL
Exploring Ruby on Rails and PostgreSQL
 
Javascript Best Practices and Intro to Titanium
Javascript Best Practices and Intro to TitaniumJavascript Best Practices and Intro to Titanium
Javascript Best Practices and Intro to Titanium
 
Polyglot Grails
Polyglot GrailsPolyglot Grails
Polyglot Grails
 
Introduction to JRuby
Introduction to JRubyIntroduction to JRuby
Introduction to JRuby
 
Peru JUG Micronaut & GraalVM
Peru JUG Micronaut & GraalVMPeru JUG Micronaut & GraalVM
Peru JUG Micronaut & GraalVM
 
Gradle.Enemy at the gates
Gradle.Enemy at the gatesGradle.Enemy at the gates
Gradle.Enemy at the gates
 
Polyglot and Functional Programming (OSCON 2012)
Polyglot and Functional Programming (OSCON 2012)Polyglot and Functional Programming (OSCON 2012)
Polyglot and Functional Programming (OSCON 2012)
 
GraalVM
GraalVMGraalVM
GraalVM
 
Ruby on rails
Ruby on railsRuby on rails
Ruby on rails
 
Practical JRuby
Practical JRubyPractical JRuby
Practical JRuby
 
Bitter Java, Sweeten with JRuby
Bitter Java, Sweeten with JRubyBitter Java, Sweeten with JRuby
Bitter Java, Sweeten with JRuby
 
JRuby in a Java World
JRuby in a Java WorldJRuby in a Java World
JRuby in a Java World
 
Session 02 - Elements of Java Language
Session 02 - Elements of Java LanguageSession 02 - Elements of Java Language
Session 02 - Elements of Java Language
 
Introduction to the wonderful world of JavaScript
Introduction to the wonderful world of JavaScriptIntroduction to the wonderful world of JavaScript
Introduction to the wonderful world of JavaScript
 
Ruby Metaprogramming - OSCON 2008
Ruby Metaprogramming - OSCON 2008Ruby Metaprogramming - OSCON 2008
Ruby Metaprogramming - OSCON 2008
 
GWT-Basics
GWT-BasicsGWT-Basics
GWT-Basics
 
GWT-Basics
GWT-BasicsGWT-Basics
GWT-Basics
 
Apache Drill (ver. 0.2)
Apache Drill (ver. 0.2)Apache Drill (ver. 0.2)
Apache Drill (ver. 0.2)
 
The Java alternative to Javascript
The Java alternative to JavascriptThe Java alternative to Javascript
The Java alternative to Javascript
 

More from tutorialsruby

&lt;img src="../i/r_14.png" />
&lt;img src="../i/r_14.png" />&lt;img src="../i/r_14.png" />
&lt;img src="../i/r_14.png" />tutorialsruby
 
TopStyle Help &amp; &lt;b>Tutorial&lt;/b>
TopStyle Help &amp; &lt;b>Tutorial&lt;/b>TopStyle Help &amp; &lt;b>Tutorial&lt;/b>
TopStyle Help &amp; &lt;b>Tutorial&lt;/b>tutorialsruby
 
The Art Institute of Atlanta IMD 210 Fundamentals of Scripting &lt;b>...&lt;/b>
The Art Institute of Atlanta IMD 210 Fundamentals of Scripting &lt;b>...&lt;/b>The Art Institute of Atlanta IMD 210 Fundamentals of Scripting &lt;b>...&lt;/b>
The Art Institute of Atlanta IMD 210 Fundamentals of Scripting &lt;b>...&lt;/b>tutorialsruby
 
&lt;img src="../i/r_14.png" />
&lt;img src="../i/r_14.png" />&lt;img src="../i/r_14.png" />
&lt;img src="../i/r_14.png" />tutorialsruby
 
&lt;img src="../i/r_14.png" />
&lt;img src="../i/r_14.png" />&lt;img src="../i/r_14.png" />
&lt;img src="../i/r_14.png" />tutorialsruby
 
Standardization and Knowledge Transfer – INS0
Standardization and Knowledge Transfer – INS0Standardization and Knowledge Transfer – INS0
Standardization and Knowledge Transfer – INS0tutorialsruby
 
0047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa060269
0047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa0602690047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa060269
0047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa060269tutorialsruby
 
0047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa060269
0047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa0602690047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa060269
0047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa060269tutorialsruby
 
BloggingWithStyle_2008
BloggingWithStyle_2008BloggingWithStyle_2008
BloggingWithStyle_2008tutorialsruby
 
BloggingWithStyle_2008
BloggingWithStyle_2008BloggingWithStyle_2008
BloggingWithStyle_2008tutorialsruby
 
cascadingstylesheets
cascadingstylesheetscascadingstylesheets
cascadingstylesheetstutorialsruby
 
cascadingstylesheets
cascadingstylesheetscascadingstylesheets
cascadingstylesheetstutorialsruby
 

More from tutorialsruby (20)

&lt;img src="../i/r_14.png" />
&lt;img src="../i/r_14.png" />&lt;img src="../i/r_14.png" />
&lt;img src="../i/r_14.png" />
 
TopStyle Help &amp; &lt;b>Tutorial&lt;/b>
TopStyle Help &amp; &lt;b>Tutorial&lt;/b>TopStyle Help &amp; &lt;b>Tutorial&lt;/b>
TopStyle Help &amp; &lt;b>Tutorial&lt;/b>
 
The Art Institute of Atlanta IMD 210 Fundamentals of Scripting &lt;b>...&lt;/b>
The Art Institute of Atlanta IMD 210 Fundamentals of Scripting &lt;b>...&lt;/b>The Art Institute of Atlanta IMD 210 Fundamentals of Scripting &lt;b>...&lt;/b>
The Art Institute of Atlanta IMD 210 Fundamentals of Scripting &lt;b>...&lt;/b>
 
&lt;img src="../i/r_14.png" />
&lt;img src="../i/r_14.png" />&lt;img src="../i/r_14.png" />
&lt;img src="../i/r_14.png" />
 
&lt;img src="../i/r_14.png" />
&lt;img src="../i/r_14.png" />&lt;img src="../i/r_14.png" />
&lt;img src="../i/r_14.png" />
 
Standardization and Knowledge Transfer – INS0
Standardization and Knowledge Transfer – INS0Standardization and Knowledge Transfer – INS0
Standardization and Knowledge Transfer – INS0
 
xhtml_basics
xhtml_basicsxhtml_basics
xhtml_basics
 
xhtml_basics
xhtml_basicsxhtml_basics
xhtml_basics
 
xhtml-documentation
xhtml-documentationxhtml-documentation
xhtml-documentation
 
xhtml-documentation
xhtml-documentationxhtml-documentation
xhtml-documentation
 
CSS
CSSCSS
CSS
 
CSS
CSSCSS
CSS
 
0047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa060269
0047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa0602690047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa060269
0047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa060269
 
0047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa060269
0047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa0602690047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa060269
0047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa060269
 
HowTo_CSS
HowTo_CSSHowTo_CSS
HowTo_CSS
 
HowTo_CSS
HowTo_CSSHowTo_CSS
HowTo_CSS
 
BloggingWithStyle_2008
BloggingWithStyle_2008BloggingWithStyle_2008
BloggingWithStyle_2008
 
BloggingWithStyle_2008
BloggingWithStyle_2008BloggingWithStyle_2008
BloggingWithStyle_2008
 
cascadingstylesheets
cascadingstylesheetscascadingstylesheets
cascadingstylesheets
 
cascadingstylesheets
cascadingstylesheetscascadingstylesheets
cascadingstylesheets
 

Recently uploaded

Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?XfilesPro
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 

Recently uploaded (20)

Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 

Devoxx%202008%20Tutorial

  • 1. JRuby in Action Ruby, Rails, GUIs, and More Except where otherwise noted, the content of this presentation is licensed under  the Creative Commons Attribution­Share Alike 3.0 United States License (http://creativecommons.org/licenses/by­sa/3.0/us/).
  • 2. The JRuby Guys ● Charles Oliver Nutter and Thomas Enebo ● JRuby for 4+ years ● Sun Microsystems for 2+ years ● JVM languages
  • 3. Ruby ● Dynamically typed ● Pure object-oriented ● C-language implementation ● Green threads ● “Fast enough” == “a bit slow” ● 1.8.6/7 is current ● 1.9 in development ● Focus on performance, character encodings
  • 4. JRuby ● Ruby on the JVM ● Nearly complete Ruby compatibility ● Interop with Java libraries ● Improvements on original ● Native threading ● Faster by most measurements ● 1.1.6 this week (RC1 out now) ● 1.8.6 compatible, 1.9 in progress
  • 5. Ruby Tutorial ● Walkthrough of all the key Ruby features ● Interactive! Please jump in with questions ● Free-form, live-coded ● Ruby is fun, Ruby tutorial should be fun!
  • 6. Modules Object MyGreatClass class MyGreatClass < Object … end
  • 7. Modules Object MyGreatModule MyGreatClass class MyGreatClass < Object include MyGreatModule end
  • 8. Modules Class class Object Object class meta class MyGreatClass MyGreatClass class meta class class MyGreatClass < Object extend MyGreatModule end
  • 9. Modules Object Object Meta class MyGreatModule MyGreatClass MyGreatClass Meta class class MyGreatClass < Object extend MyGreatModule end
  • 10. Singletons Object my_object MyGreatClass class MyGreatClass end my_object = MyGreatClass.new
  • 11. Singletons Object MyGreatClass MyGreatClass my_object singleton class class MyGreatClass end my_object = MyGreatClass.new class << my_object end
  • 12. More Cool Ruby: FFI ● Foreign Function Interface ● Call C libraries from Ruby code ● Works on Ruby and JRuby ● Map simple types, structs, callbacks ● DSL for function binding
  • 13. JVMScript (working title) ● A DSL for generating JVM bytecode ● Multiple Ruby techniques employed ● Goal: structured assembly for JVM
  • 14. What is Ruby on Rails? ● A Full-stack MVC web development framework ● Open Source (MIT), Many Contributors ● Written in Ruby ● Single-Threaded design (2.2 has MT-mode) ● First released in 2004 by David Heinemeier Hansson ● Super-hyped! :) :(
  • 15. Rails Precepts ● Convention over Configuration ● Why punish the common cases? ● Encourages standard practices ● Everything simpler and smaller ● Don't Repeat Yourself (DRY) ● Framework written around minimizing repetition ● Repetitive code harmful to adaptability ● Agile Development Environment ● No recompile, deploy, restart cycles ● Simple tools to generate code quickly ● Testing built into framework
  • 16. Why Rails? ● Greatly simplified web development ● “Less Rails code than Java app configuration” ● Instant applications: working code in minutes ● Makes small apps trivial to create ● Ruby is an excellent language ● Still growing in popularity in leaps and bounds
  • 17. The Rails Stack ● ActiveRecord ● ORM on steroids ● ActionPack ● View and controller support ● ActiveResource ● Restful resources ● Actionmailer ● Email ● Activesupport ● Unicode, json, miscellaneous helpers
  • 18. Rails Demo Let's write a simple blog app
  • 19. JRuby on Rails ● Java is Everywhere ● Every OS/Hardware platform you can think of ● Probably already on a server near you ● Less political resistance ● “JRuby is just another Jar file” ● No need to install additional software on your servers ● Wider database support ● Decent performance
  • 20. JRuby on Rails (Warbler) ● Java-style deployment to Application Server ● Bundles a Rails application into a WAR file ● Hand WAR file to production staff ● Rails App deployed! Rack http://wiki.jruby.org/wiki/JRuby_Rack
  • 21. JRuby on Rails (GlassFish v3 gem) ● Entire App Server in a 4Mb gem ● Ruby-style deployment to GF Application Server ● gem install glassfish ● glassfish <Rails app dir> ● Configurable number of listeners all in one process ● Under active development GlassFish
  • 22. Parts is Parts ● Script Java technology you need into your Rails app ● Call “legacy” Java from existing project ● Get additional choices
  • 23. Swing GUI in JRuby ● Builder approach (ex: Rubeus) ● Sort of a “model 1” 1998 JSP approach ● Great for simple forms ● Difficult for long-term, large apps ● Tool-driven approach (ex: MonkeyBars) ● Tool manages UI layout ● Logic is MVC-driven ● UI and logic evolved, maintained separately ● Easier to scale to large apps