开发者

Design question for working with Ruby vs. jRuby

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜