Ruby

Hi.

I wanted to let you know, that I managed to run Vaadin on JRuby on Tomcat.

It works by creating ruby run time environment in java, and calling ruby classes from java start up application class.

If anyone is interested in details, let me know.


require "java"
require "misc"

class MainApp4
  include IApp

  def init()
    @win=MainWindow4.new
    MainApp.getCurrent.setMainWindow @win
  end
  
end

class MainWindow4 < Window
  include Button::ClickListener

  def initialize
    super()
    get_content.set_spacing true
    for x in (1..10) do
      b=Button.new "jRuby 4ever "+x.to_s
      b.addListener self
      addComponent b
    end
  end

  def buttonClick( event)
    showNotification "Button was pressed "
  end

end

bye,ivan

I think that this project also uses JRuby:
http://www.oxygenite.org/blog/?p=33
, but behind the scenes.

The syntax looks nice. Have you used JRuby for larger Vaadin based applications?

Not yet, I was just experimenting a bit to see how it would work.
Right now my biggest concern is how to debug such a code.

I would love to learn more on how you got it running. I’m not very Java savvy but I’m impressed with how Vaadin looks/works. Please drop any wisdom you can my way :wink:

Hi,
I found this very helpful too. I’d really like to have the choice of using Ruby or Python with Vaadin in addition to Java.
ZK Framework
does very well in this regard. I think this extension would help expand the reach of Vaadin too.
Regards,
Anthony