charles nutter presentations

17
JRuby on Rails Charles Oliver Nutter

Upload: webuploader

Post on 15-May-2015

813 views

Category:

Technology


0 download

TRANSCRIPT

Page 1: Charles Nutter Presentations

JRuby on RailsCharles Oliver Nutter

Page 2: Charles Nutter Presentations

Agenda•Who Am I

•What Is JRuby

•Why JRuby on Rails

•Demos

•What Now

•Conclusion

Page 3: Charles Nutter Presentations

Who Am I•Charles Oliver Nutter

•Senior Staff Engineer at Sun Microsystems

• JRuby Core Developer

•Rubyist wannabe living in a Java world

•Based in Minneapolis, Minnesota, USA

Page 4: Charles Nutter Presentations

Why Go To Sun?

•Work full-time on JRuby

•Opportunity to make real progress

•Sun folks get it, want Ruby to succeed

•Java folks need Ruby

Page 5: Charles Nutter Presentations

Why Stay in Minnesota

Page 6: Charles Nutter Presentations

What Is JRuby•100% Java impl of Ruby...Ruby on

the JVM

•Pure interpreted, native threaded

•Born 2001, product of many developers

•Largely Ruby 1.8-compatible

•Slower than Ruby...for now

Page 7: Charles Nutter Presentations

Ruby calling Java• require ‘java’

include_class “javax.swing.JFrame”include_class “javax.swing.JButton”

frm = JFrame.new(“My frame”)btn = JButton.new(“My button”)

frm.set_size(300, 300)frm.content_pane.add(btn)frm.show

Page 8: Charles Nutter Presentations

Ruby calling Java• include_class \

“java.awt.event.ActionListener”

class MyListener < ActionListener def actionPerformed(event) event.source.text = “New text” endend

btn.add_action_listener(MyListener.new)

Page 9: Charles Nutter Presentations

Why JRuby on Rails•Java is pervasive

•Java libraries are exhaustive

•Many still believe Java is the “everytool”

•Java webapp developers are unhappy

•Rails webapp developers are happy

Page 10: Charles Nutter Presentations
Page 11: Charles Nutter Presentations

What do Rails Devs Get•Scads of libraries; if you need it,

there’s a lib

•JDBC - universal database support

•“Good” EE stuff: clustering, failover, deployment, remote management

•Extensive monitoring capabilities

•A gateway to the “enterprise”

Page 12: Charles Nutter Presentations

What do Java Devs Get

•A web framework that’s usable

•A useful schema management tool (finally)

•Markup that doesn’t suck

•Four extra days per week

•Happiness

Page 13: Charles Nutter Presentations

Depot 2ActiveRecord-JDBC to MySQLRails integrated with Java EE

Java Management Extensions (JMX)

Page 14: Charles Nutter Presentations

What Now: Short Term

•Fix broken bits

•Marshal-based session

•Interpreter bugs

•Performance

•Script-based Java EE/Java library support

Page 15: Charles Nutter Presentations

What Now: Long Term• Implement remaining C extensions:

Mongrel, SSL, others you’d suggest?

•Continue expanding ActiveRecord-JDBC

•Abstract out schema definition

•Solidify automatic CRUD support

•More GUI tool support

Page 16: Charles Nutter Presentations

Conclusion• JRuby on Rails mostly works right now

• JRuby will not be “done” until it’s fully working

•ActiveRecord-JDBC opens many doors

• Java EE is actually fun with Rails

•More Rails is more Rails...JRuby enables!

Page 17: Charles Nutter Presentations

Information•Email: [email protected]

•Blog: headius.blogspot.com

• JRuby: www.jruby.org

•ActiveRecord-JDBC and Mongrel-Java: rubyforge.org/projects/jruby-extras

•More JRuby at RubyConf and JavaPolis