I currently have an application that's written in Java EE and a front-end site hosted in Joomla. I'm beginning a process of collapsing the 2 into a single Rails 3 application. However, this is going to be a very long and phased process.
I'm trying to figure out a Best Practice for handling the models in this case. For instance, the first phase is to migrate user registration. Currently this is handled in Java then Java populates the Joomla tables with the appropriate data. Rails is going to be taking over this function and populating its own database (devise) and cross-populating to the Java and Joomla databases.
As the project progresses and pieces of the former application are deprecated the models will be removed (if I live that long ; ).
I know there are a few ways of accessing multiple databases from within a rails application (that all boil down to the same, just how it's configured), but I'm trying to figure out the smartest way to go about it:
Should I just create mini-apps in /lib?
Should I use rails generators and create real rails models (ie. /app/models/old-app-name/)
How do I get everything to tie in?
So how would you handle this? I've got some stuff up and running but it's early in the project and what I've got is fairly messy. I'd really like to be able to generate rails models as in the 2nd option above, but am unsure exactly what the process would be as far as hooking all that up.
To make matters more interesting, I'm transitioning to BDD/TDD so I do want it all testable via RSpec2, etc.