August 2008

Strangling a Java Webapp with Rails by Tyler Jennings

The strangler software pattern gets its name from the tree-strangling vines of the Amazon rain forest. These seemingly benign vines grow up the trunk of an established tree and over many years the tree is systematically consumed and destroyed, leaving a magnificent growth of vines where the tree once stood.

The pattern that is the software equivalent of the vine helps a code base transition from an old crusty architecture by systematically replacing it. The cardinal rule being that new code cannot call into the old, only the other way around. If a new feature requires behavior from the old code, the old code must be ported.

With JRuby enabling Rails on the JVM a similar approach can be taken. A java web application framework stack, let's say Struts and Hibernate, can have its view components systematically replaced by Rails without ever stopping new feature development. With Struts consumed we can set our sights on the model - systematically replacing Java classes with Ruby ones and Hibernate persisted objects with ActiveRecord models. Eventually leaving us with a super-productive, magnificent, Rails ecosystem to live within.

This talk will cover JRuby integration with Java and running Rails in the JVM, concluding with the port of a simple Struts / Hibernate app to Rails. The audience should leave with all the knowledge necessary to port their own applications to Rails.

When: Thursday, August 28, 6:00-7:30
Where: Obtiva, 566 W. Adams St., Suite 400, Chicago, IL
Eating: Giordano's Pizza

Previous Events

  • June 2008: Jython Reborn by Chris McAvoy
  • May 2008: Polyglot and Poly-paradigm Programming (for the Persnickety) by Dean Wampler
RSVP'd:

Follow PPoC on Twitter!