简体   繁体   中英

Using JRuby or Python to call some 3rd party Java libraries - architecture question

I am evaluating what I will use on the front and back ends of a project. I definitely will need to use some 3rd party Java libraries, but I am curious whether there is a nice way to do the front and back-end layer in something like Ruby or Python?

Or is it possible to just call the Java libraries from Ruby/Python and avoid programming using Java alltogether? :)

All of these run on Tomcat, and are deployed using a .war file, correct?

I know for a fact that you can call all your Java libraries using JRuby. You can use the ruby programming language on your front and back end via Rails (Rails is a framework written in ruby).

The difference between MRI (Matz Ruby) and JRuby is that JRuby runs on the JVM, whereas MRI has its own VM which is different from the JVM.

By running on the JVM, you gain access to a whole lot of Java libraries.

Any JVM based language will allow you to use your java libraries while writing your code in your language of choice. So, you can use JRuby (ruby on the JVM), Jython (python on the jvm), Groovy, Scala, Clojure.

You will be able to deploy all of those to tomcat using war file.

Your actual choice of language depends on your requirements. Clojure is a lot like Lisp, so if you're into that it's worth looking into, very impressive. Scala is getting quite a lot of visibility and is equally strong in functional and OO, it also has a very nice web framework called Lift worth considering. Groovy is pretty mature now and has grails if you like rails-like framework. Of course you can't really go wrong with JRuby on Rails, the JRuby project is very active and well supported.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM