# Rails using Custom Java Persistence and Codebase?

**URL:** <https://www.ruby-forum.com/t/rails-using-custom-java-persistence-and-codebase/66059>\
**Category:** Rails\
**Created:** [August 23, 2006, 2:54am UTC](https://www.ruby-forum.com/t/rails-using-custom-java-persistence-and-codebase/66059 "2006-08-23T02:54:23Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![eric](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/898d66/32.png) [@eric](https://www.ruby-forum.com/u/eric)\
**Post date:** [August 23, 2006, 2:54am UTC](https://www.ruby-forum.com/t/rails-using-custom-java-persistence-and-codebase/66059/1 "2006-08-23T02:54:23Z")

</div>

Hello,

I have a mature Java codebase that includes my own database persistence  
mechanism. I simply want to build a web UI around the existing code.  
I’ve read a lot of good things about Ruby, obviously. However, I don’t  
really want to code my logic in Ruby other than the UI and UI controller  
layer, and I don’t need the Rails database persistence later. I would  
end up using JRuby to call out to my Java APIs as web requests are  
received.

The question is, am I better off using another web application server  
environment (there are tons out there – Tapestry, Spring, WebObjects).  
In fact I am most familiar with WebObjects and I think it is a very  
powerful environemnt, and I’m leaning towards it right now. Would  
anyone advise the use of Ruby on Rails instead, or in combination with  
WebObjects to pick up the app server pieces that WO is missing (if any)?  
In short, if I don’t need/want to take advantage of the powerful Ruby  
language for my object model and business logic, and I don’t need Rails  
DB persistence, then is there a benefit of using RoR over WebObjects,  
Tapestry, or Spring?

Thank you for your consideration.

---

<div class="post-metadata">

**Author:** ![eric](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/898d66/32.png) [@eric](https://www.ruby-forum.com/u/eric)\
**Post date:** [August 23, 2006, 6:42pm UTC](https://www.ruby-forum.com/t/rails-using-custom-java-persistence-and-codebase/66059/2 "2006-08-23T18:42:01Z")

</div>

On 8/22/06, Eric [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Tapestry, or Spring?  
> I haven’t seen any replies, but I’ll weigh in from a JRuby core  
> perspective…

This seems like a perfect application of JRuby. Rails is great as a full  
suite of services, but each service independently is useful as well. I  
don’t  
see that there’s anything wrong with using the “VC” part of “MVC” with a  
different model and persistence layer.

I have also been disappointed with most of the Java-based web  
frameworks,  
almost entirely due to their over-heavy, over-complicated approaches to  
implementing the view and controller portions of an app. If I were to  
write  
an application now, I would give strong consideration to something more  
Railsy, even if it were backed by Java-based services.

If you choose to go forward with this approach, Eric, the JRuby team  
will be  
very interested in helping make it happen.

–  
Contribute to RubySpec! @ [www.headius.com/rubyspec](http://www.headius.com/rubyspec)  
Charles Oliver N. @ [headius.blogspot.com](http://headius.blogspot.com)  
Ruby U. @ ruby.mn  
JRuby Developer @ [www.jruby.org](http://www.jruby.org)  
Application Architect @ [www.ventera.com](http://www.ventera.com)

---

<div class="post-metadata">

**Author:** ![eric](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/898d66/32.png) [@eric](https://www.ruby-forum.com/u/eric)\
**Post date:** [August 23, 2006, 11:20pm UTC](https://www.ruby-forum.com/t/rails-using-custom-java-persistence-and-codebase/66059/3 "2006-08-23T23:20:02Z")

</div>

Thank you for the offer of support with JRuby. I appreciate it. What I  
think I’m going to do is develop the site in a combination of WebObjects  
and RoR/JRuby. I obviously need to experiment with RoR since I’ve never  
used it (as opposed to WebObjects which I am both familiar and happy  
with). If I need help with JRuby I’ll let you know. I’ll also plan on  
posting my impressions of RoR vs. WebObjects as I dig into RoR.

Thank You,  
Eric
