This post originated from an RSS feed registered with Java Buzz
by Marc Logemann.
Original Post: a use-case for Ruby in our J2EE app
Feed Title: Logemann Blog
Feed URL: http://www.logemann.org/blojsom/blog/default/?flavor=rss2
Feed Description: Marc's thoughts on Java and more
Lately i was thinking about having more dynamic interfaces to customer databases than currently. Our software has two important customer interfaces during the business process lifecycle, it gets order data from the customer database and write informations about parcel distribution back to the customers database.
Right now the customer has to implement an java interface and can then plug in the class to our system. Pretty normal approach to that kind of thing. But lately there were changes in the customers db structure so that we had to modify the implementations of the interfaces and ship them to the customer again. Of course thats nothing particular difficult but i thought about having a more dynamic approach to this problem.
How about using Ruby (in combination with JRuby of course) to call the customer db interfaces. This way the code (mainly SQL statements) could be changed on the fly (perhaps even by the customer) without all that recompile+redeploy issues. If i get it right it should be even possible to use java objects like DataSources in the ruby code thus having the same db access semantics as in java. With the help of BSF/JSR223 the embedding should be also no pain. Of course i could use other scripting engines like Groovy or Jython but Ruby is en vogue right? ;-)