zoukankan      html  css  js  c++  java
  • "Integration" between Rails' ActiveRecord and Java's Hibernate Stack Overflow

    "Integration" between Rails' ActiveRecord and Java's Hibernate - Stack Overflow

    "Integration" between Rails' ActiveRecord and Java's Hibernate - Stack Overflow

    Hi everybody: let me do a bit of "concept mining" here: I am involved in mantaining/extending an application whose functionality is distributed across several servers. For example, we have a machine running the ApplicationServer, another running the DataServer and so on.

    This application has a Web Interface. The current UI is totally implemented in Java, and in a way that makes adding new functionality hard. One of my goals is extending this interface, and we're considering shifting the whole thing to another platform, like Rails, for example.

    Problem being, the database that is manipulated by the UI (possibly Rails in the future) is also manipulated by ApplicationServer (Java).

    So, my main question is: both Rails and Java can access databases through their own ORM (ActiveRecord for Rails and Hibernate or similar for Java). Is there any way to guarantee that the mappings are consistent?*

    Even if the answer is a hard "no", I'd also like to hear your thoughts on how you'd approach this scenario.

    I hope the question is clear enough, but warn me if it isn't and I'll edit accordingly. =D

    *Edit: per request, I'm extending this explanation: what I mean is, how to make sure things don't break when someone needs to add a new field to the database and edits the Hibernate mapping because of it? I know that Rails "guesses" the entity attributes pretty much by itself (making things easier), but I was wondering if there was some "magical way" to "connect" the ActiveRecord directly to the Hibernate mapping.

  • 相关阅读:
    大型系统的支撑
    应用系统开发思想的变迁
    面向对象基本特征的来历
    GC使用注意
    系统分层演变
    Oracle位图索引
    剪刀剪纸
    权限设计随笔(有空细化)
    Hibernate基础学习(六)—Hibernate二级缓存
    Hibernate基础学习(五)—对象-关系映射(下)
  • 原文地址:https://www.cnblogs.com/lexus/p/2360725.html
Copyright © 2011-2022 走看看