How to develop Java applications in Ruby on Rails?

We have an application that needs to be run on the Java application server. I have to develop a webapp to go with it. I started reading about Ruby on Rails, and I really like the approach: MVC, conditional configuration, a lot of things that take care of you.

I may be having an impossible dream, but are there any Java Webapp developments that work in a similar way?

Direct JSP is terrible because logic and presentation are ambiguous. Simple template systems such as Velocity and Freemarker do not use a database. I don't know much about Spring.

Everyone here knows Java, and we don’t have time until the next release cycle to learn a completely new language and library, otherwise I would have turned into RoR in a serious way.

+7
java jsp model-view-controller ruby-on-rails-3
source share
2 answers

Impossible at all. This is already done.

Here are a few Java equivalents:

These are all SpringSource products. If you are serious about Java web development, I highly recommend that you check them out.

Grails actually inspired Rails, hence the name, so you'll see a lot of similarities in the functions and the paradigms between them, including MVC, conditional configuration, and code generation. Therefore, if you want to get the right to develop Rails in Java, I highly recommend Grails. I should note that Grails has more features than Rails, some of which I consider Rails. For example, Grails provides a service layer to handle all business logic. You can easily implement the service level in Rails, but we all love its convenience, and since Grails includes it, it’s more convenient. I hopped between Rails and Grails at one time, both are great frameworks.

Keep in mind that you can also create Rails using Java via JRuby, which is also good. You get all the features of the Ruby language (version 1.8), as well as the ability to integrate and use the Java libraries in your Ruby code.

SpringRoo is the new SpringSource code generator structure, so you can use it with the Spring framework to speed application development.

Grails is actually built on top of the Spring and Groovy frame. Groovy is a Java derivative that looks more like a scripting language and provides all the meta-dynamic programming that you see in languages ​​like Ruby and Python. However, Groovy allows you to write Java code, so there is no need to learn it, not completely.

+9
source share

Take a look at the Play Framework . I think this is the best way to develop Java web applications at the moment. Of course, the fastest. There is no deployment cycle. Save the code and refresh your browser.

It comes with Hibernate and many advanced features that simplify the development process. Fully REST based and stateless.

Add jQuery and it looks like a web paradise.

+2
source share

All Articles