Porting / rewriting a Rails application in Java

Without even trying to start a fiery war between the Rails / Ruby guys and Java. I do not want to discuss why, but I want to rewrite / migrate my existing rails application in Java.

Here is what I need to find alternatives for:

  • PostgreSQL I can use any database, but with capable ORM in Java, which is comparable to ActiveRecord.
  • Resque For background processing in a Rails application. I need to find a similar solution in Java.
  • MVC Although strictly not as elegant as Rails MVC, everything closer to it in Java will be fine.

Any expert views on this?

EDIT: I want to develop in the Java language (so this excludes Scala, Groovy, JRuby and similar languages)

+4
source share
3 answers

I have been developing Java web applications for about 8 years before switching to Ruby / RoR. A standard set of libraries that I would recommend:

  • Spring mvc
  • Hibernate orm
  • possibly quartz as Sidekiq equivalent
  • Spring ROO to bundle it all together and boot things.
  • I would recommend freemarker or speed as a replacement for JSP.

But no matter what you choose, you will regret :)

+1
source

ORM: Hibernate is pretty much the standard. Anyone that implements JPA will do.

Background processing: often provided by your application server (e.g. JBoss).

+1
source

The JavaLite stack is the closest to Rails in Java, complete with ActiveWeb (web parts - controllers, testing, dynamic compilation, custom tags, etc.). ActiveJDBC is an implementation of ActiveRecord, DB-Migrator for migration: http://javalite.io/database_migrations , HornetNest (JMS-based command template that replaces Sidekiq) and much more. A complete stack for modern Java Web development in one package.

Check out: http://javalite.io

0
source

All Articles