Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Integrating a Ruby/Rails app into a Java app.

I have a Ruby/Rails app, which is standard Rails CRUD, with some jQuery and no AJAX.

I have a Java web app with which I would like to integrate the Ruby/Rails app. The Rails app uses the same database as the Java web app and (safely) shares a few tables, and I will put the Rails app into a WAR file using a JRuby/Warbler and the deploy it to a separate Tomcat on the same physical server. The Java app runs on port 80, and the Rails app runs on port 3000 on the same server.

In the UI of the Java app, there is a place to put the new UI of the Ruby app. It is in the form of a few blank "div" tags on a few skeleton pages, and some accompanying screen real estate. I don't want to finagle with the Java UI code as much as possible, and get away with the minimum needed.

Is there a way to run the UI of the Ruby app as within two or three div's to which I have access? Ideally, can I point each div to load up one entry point in my Rails app (URL) and then have it load other pages as needed?

Do I have to worry about back buttons?

Are there any other questions I should ask to solve this problem?

Cheers, Jay

like image 849
Jay Godse Avatar asked Nov 04 '22 13:11

Jay Godse


1 Answers

iframes in the divs might get you there fastest if the Rails port is also visible to the outside. If it isn't, then perhaps it can be configured to work on some /subpath under port 80, though that might lead to a little bugfixing if your Rails code has assumptions about it being at /.

like image 148
mpartel Avatar answered Nov 09 '22 11:11

mpartel