Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to migrate Java EE application to rails

We are in the process of migrating our CRM app built using (JBoss AS, JDBC, Hibernate, MySQL) into Rails 3.2.x

We would like to keep the database schema as it is, so that we have minimal effort while we move into a new web architecture with Rails. Are there any tools which will help me generate the models/controllers and handle migrations from a database perspective.

What strategy should we use so that we can keep the old application humming in production before we move to the newer Rails app.

like image 707
Sam Avatar asked Oct 22 '22 20:10

Sam


1 Answers

Here is what I think, and what I have done the same past :)

1 - first write the models coupling with your existing DB (I think you are using ActiveRecord with Rails , if not you should :D)

2 - Try your level best to use ActiveRecord and its components, avoid using pure SQL, because later that will create a mess

3 - cover with good unit tests and make sure your models are working with existing DB and all the relations etc.

4 - then move to the controller and view layer

5 - Golden rule, try to keep Rails conventions as much as possible, because the beauty of rails is that, if you follow the rails way things will "just work"

(Since you are using the same database you will not have the headache of data migration).

And +1 migrating from Java to Ruby :)

like image 101
sameera207 Avatar answered Oct 24 '22 12:10

sameera207