开发者

Design question for working with Ruby vs. jRuby

开发者 https://www.devze.com 2023-02-27 19:50 出处:网络
I have a project which will need to have some Java layer. I am wondering it if is reasonable to try to avoid using jRuby by having the Ruby code call some URL that would invoke a Java controller, whic

I have a project which will need to have some Java layer. I am wondering it if is reasonable to try to avoid using jRuby by having the Ruby code call some URL that would invoke a Java controller, which, I guess, would return some JSON.

Is that a reasonable approach? Or does it have inherent problems when in comes to architecture and would be a pain in the long run?

Also, if it is just Ruby, can it s开发者_开发问答till be hosted on Tomcat and be part of my .war file? And What is that rails part that I will seem to be missing?


You could do it either way. For me it would be easier not to involve Java in the mix, and keep Ruby talking to JRuby. Also, I'm not sure if you know this or not, but JRuby is also available as a self contained interpreter. Look for the complete jar in the download page.

Also, if Java is a must, you could call the Ruby code from Java, via the scripting engines, as presented here

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号