-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 posts ] 
Author Message
 Post subject: Hibernate in the .NET environment
PostPosted: Tue Aug 26, 2003 9:04 pm 
Newbie

Joined: Tue Aug 26, 2003 8:54 pm
Posts: 1
Hi All,

Very interested in Hibernate but how would I use in .NET.

Here are some questions:

1. Can I use Visual J# and compile the source up and then use this?

2. Does the it fit in with .NET framework. .NET uses ADO.NET so can it interoperate with this environment?

3. Microsoft are working on a technology called ObjectSpaces which on the surface seems to have similar qualities. I think it will be released when Yukon (the next version SQL Server) is released. It may be tightly integrated into this environment. Any thoughts on this?

Regards,

Nick


Top
 Profile  
 
 Post subject:
PostPosted: Wed Aug 27, 2003 8:24 am 
Regular
Regular

Joined: Tue Aug 26, 2003 3:09 pm
Posts: 58
There is an effort to port Hibernate to .NET called NHibernate (http://sourceforge.net/projects/nhibernate). I don't know the status of the project though.

Joe


Top
 Profile  
 
 Post subject:
PostPosted: Wed Aug 27, 2003 11:44 am 
Newbie

Joined: Wed Aug 27, 2003 11:23 am
Posts: 4
Hi Joe. I am no expert but here are my opinions:

1 - No, Hibernate uses 3rd party libraries that just don't have a conversion to .net to allow for compilation. I suppose you could use JNBridge (it is named something like that - I believe Borland makes it to allow native Java and .NET to communicate, basically a remoting wrapper) to allow .NET code to call Java code - of course, that is not LPGL or open sourced.

2 - I have recently been posting some questions to the Discussion Forums for NHibernate. The project has been dead as can be for a while, but there is interest in it. It probably went dead because there are some significant differences between how JDBC and ADO.NET work. The biggest difference is in the Providers (SQL, OLEDB, ODBC, Oracle) and how you configure commands. This is completely transparent to Java - regardless of the actual JDBC provider - a prepared statement look exactly the same (minus the SQL differences). In .NET some can use ? for parameters, some require @paramName, some require :paramName except when creating them - quite a cluster... So the code written around the PreparedStatements will need some redesign for an IDbCommand. There are also more options to handle Transaction in Java. I am not at all familiar with Proxies in .NET, but from what I have read in the developer discussion indicates they are different.

There is no reason the design and concept behind Hibernate can't work. Hibernate's design is soooo much better than any other OSS or commercial offering in the .NET world. Most of the existing ones require you to extend a base class and some even try to offer all the extra crap of Data Binding in your business objects. In particulare I have been browsing OJB-NET, one of the recent discussions is the developer saying he can't do dirty checking if the object doesn't extend an object or implement a certain interface, but that is exactly what Hibernate does! So it can be done, he just doesn't have the design to support it.


3 - ObjectSpaces: who knows. MS has been very quiet on this subject and I have my doubts that the first version or two will work with any data provider other than the System.Data.SqlClient. Their design will most likely use Attributes, I just don't like the idea of decorating my business code with all the persistence configuration, but it is very popular thing to do with XDoclet and Hibernate. The only difference is that with Hibernate/XDoclet you can modify a XML file generated by XDoclet without needing to recompile your code like you do with Attributes.

Just my $0.02

Mike


Top
 Profile  
 
 Post subject: Re: Hibernate in the .NET environment
PostPosted: Wed Oct 13, 2010 5:30 am 
Newbie

Joined: Wed Oct 13, 2010 5:25 am
Posts: 10
I spent my whole life trying not to be careless. Women and children can be careless. But not men.

_________________
cheap watches
replica watches uk
replica watches


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.