开发者

Does NHibernate interoperate with Hibernate? If not is there a framework out there for both Java and .NET?

Say you had:

  • a database
  • a bunch of .NET Windows GUI programs
  • a bunch of Java web applications

you could use Hib开发者_如何学编程ernate for the Java stuff and NHibernate for the .NET stuff - but would the two actually interoperate or would they be entirely different stacks?

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


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.

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.

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.


I believe not. nHibernate takes Hibernate as a reference, but they don't actually share code and are developed at different pace. You would have to know the limitations of both.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜