1 / 10

JRuby

JRuby. Monika Mevenkamp monikam 333C. [J] Ruby. 1995 Matz にっき -Yukihiro Matsumoto Ruby interpreter in C 2001 JRuby = Ruby on JVM Jan Arne Petersen 2006 Ruby takes off. PU OIT UnConference 06/2015 JRuby. Monika Mevenkamp 333C. Why [J] Ruby ?. Best of

jcrystal
Download Presentation

JRuby

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. JRuby Monika Mevenkamp monikam 333C

  2. [J] Ruby 1995 Matzにっき -Yukihiro Matsumoto Ruby interpreter in C 2001 JRuby = Ruby on JVM Jan Arne Petersen 2006 Ruby takes off PU OIT UnConference 06/2015 JRuby Monika Mevenkamp 333C

  3. Why [J] Ruby ? Best of Perl, Smalltalk, Eiffel, Ada, Lisp Lots of Gems make stuff easy require ‘http’; body = HTTP.get(url).to_s require ‘json’; array = JSON.parse(body).each do |doc| …. end require 'sshkit/dsl’; servers = %w{usr@svr1.edu kunde@svr2.edu} on servers do |host| puts "#{host} #{capture(:uptime)}" end 6412 gems at rubygems.org PU OIT UnConference 06/2015 JRuby Monika Mevenkamp 333C

  4. Gems / Applications Web Framework software testing framework code deployment VM manager IT Infrastructure management Penetration Testing RAILS Cucumber.io Capistrano Vagrant Puppet & Chef MetaSploit PU OIT UnConference 06/2015 JRuby Monika Mevenkamp 333C

  5. JRuby vs Ruby JRuby = Ruby + ability to call Java code from Ruby Ruby code from Java Ruby 2.2.2 latest ruby version JRuby 1.7.20 compatible with Ruby 1.9.3 PU OIT UnConference 06/2015 Jruby Monika Mevenkamp 333C

  6. JRuby vs Java DSPACE - 201466 Java lines Java Development Cycle - edit - mvn package 119 sec - ant update - run JRuby Development Cycle - start interactive interpreter - load Java classes 2.5 sec - type commands PU OIT UnConference 06/2015 JRuby Monika Mevenkamp 333C

  7. My First Use Task: Generate a report of the most downloaded items Available Data: Solr index with database ids Generated Report: N-DOWNLOADS: 55 BITSTREAM-ID: 17397 ITEM-ID: 9076 ITEM-HANDLE: 88435/dsp0147429929g ITEM-TITLE: DANGER, JOKING HAZARD: Humor, Norms, … COLLECTION-ID: 398 COLLECTION-HANDLE: 88435/dsp01cz30ps722 PU OIT UnConference 06/2015 JRuby Monika Mevenkamp 333C

  8. My First Use jars = Dir[File.join("/dspace/lib", '*.jar')]; jars.each {|j| require j } java_import 'org.dspace.content.Bitstream' solr_results.each do |r| bit = Bitstream.find(r.id) item = bit.getParent() title = item.getTitle() item_handle = item.getHandle() …. end PU OIT UnConference 06/2015 JRuby Monika Mevenkamp 333C

  9. jirb: start experimenting jirb> require 'irb/completion' jirb> Collection.fi<TAB> Collection.field_accessorCollection.field_readerCollection.field_writerCollection.findCollection.findAllCollection.findAuthorized Collection.find_allCollection.find_authorized PU OIT UnConference 06/2015 JRuby Monika Mevenkamp 333C

  10. [J] Ruby Fast Development Gems make it Easy Great for Experiments JRuby lets you script your Java code base PU OIT UnConference 06/2015 JRuby Monika Mevenkamp 333C

More Related