本文介绍了是否NHibernate的互操作休眠?如果不是有一个框架在那里为Java和.NET?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

假设你有:

  • 数据库
  • 在一堆.NET的Windows GUI程序
  • 在一堆Java Web应用程序

您可以使用Hibernate对Java的东西和NHibernate的.NET的东西 - 但将两人竟互操作,否则就完全不同的堆栈

you could use Hibernate for the Java stuff and NHibernate for the .NET stuff - but would the two actually interoperate or would they be entirely different stacks?

如果没有,那么有没有一种持久化框架在那里,让Java和.NET共享业务逻辑?

If not then is there a persistence framework out there that lets Java and .NET share business logic?

推荐答案

我不能谈论的Java开发人员,而是从事物的.NET方相信映射文件可以共享(描述之间的关系XML文件数据库和对象)。

I can't talk for the Java people, but from the .NET side of things I believe the mapping files could be shared (xml files describing the relationship between database and objects).

除此之外,你会想分享?你在想商业逻辑?请界定共享逻辑远一点。

Other than that, what would you want to share? Are you thinking business logic? Please define "share logic" a bit further.

您可以有你的Java开发人员编写持久code和公开为REST风格的服务,那么.NET Windows图形用户界面的程序员可以只code反对的......反之亦然。

You could have your Java people write the persistence code and expose it as RESTful services, then the .NET Windows GUI programmers could just code against that... or vice-versa.

最后应该不会有太大的Hibernate / NHibernate的code,因为它的工作是让你再也不用写了这么多的数据访问code。剩下的就是与(n)的休眠,这将是不同,这取决于你的语言最少的交互应用逻辑。

Ultimately there shouldn't be much Hibernate/nHibernate code, since it's job is for you to no longer have to write so much data access code. What's left is application logic with minimal interaction with (n)Hibernate, which will be different depending on your language.

这篇关于是否NHibernate的互操作休眠?如果不是有一个框架在那里为Java和.NET?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-22 15:59