Recently I’ve completed an ideas swimming in my head for awhile now… using ruby within the java world. And it couldn’t be easier thanks to Struts 2, Spring, and JRuby. ;)

All you need is to use Spring’s Scripted Beans, define an interface for your action so it translates well to java, and just reference the bean id in your struts 2 configuration.

That’s it… from the jsp point of view you just ignore the implementation and use methods exposed via the interface. in the code behind the scenes you don’t even know you’re using java… since everything maps back to the action and the action is written in ruby, all of your application code is written in ruby. ;)

I’ll follow up with more on this soon… I must say it’s slightly exciting to open a *.rb file in my project’s WEB-INF directory, modify it, refresh my web page and see my changes instantly versus a long drawn out recompile/redeploy. :-D

Share and Enjoy:
  • Digg
  • del.icio.us
  • Facebook
  • Google
  • BlogMemes
  • Blogosphere News
  • description
  • Fark
  • LinkedIn
  • NewsVine
  • StumbleUpon
  • Technorati
  • TwitThis
  • Yahoo! Buzz

If you're new here, you may want to subscribe to my RSS feed. Thanks for visiting!