Blog Stats
  • Posts - 25
  • Articles - 0
  • Comments - 10
  • Trackbacks - 36

 

DataSet's .Net, Java and Hibernate

I will be starting a new project in the near future, that will most likely be a mix of Java and C# technologies.  As with many projects recently, the lure of rich user interfaces, that operate well on the Windows platform, has prompted many projects to go with a .Net Presentation layer, and leverage an existing/robust J2EE backend.

Given this new bred of mixed technology development, the use of an Service Oriented Archtecture suites this paradym very well, offer up Web Services ( implemented in J2EE ) to the Gui, and you are off and running.  A C# Gui, can be just pointed to the WSDL and the appropriate pumping code will be written for you, and you are blisfully unaware of the fact that the GUI is using a WebService.

The DataSet in .Net rocks, it provides so much functionality for free, that it makes it the prefered data transport mechanism between the presentation layer and the buisiness layer, when dealing with a pure .Net technology stack then DataSet's are the way to go.  The question now is how does loved C# class fit into the Mixed technology SOA.  J2EE does not have a direct binding to this type, and hence code will need to be wrtitten, if this type is to be incorporated into this environment.  Is it worth the effort I ask. ( Comments welcome )

Hibernate is a java framework providing Object Relational Mapping, this is part of the EJB 3.0 specification now, and there is also a .Net version called NHibernate, so is it better to just consider using POJO's and PONO's (Plain Old Java Objects, Plain Old .Net Objects)

Still thinking about this at the moment, so have not come to any conclusion myself, part of my bias towards DataSet's is their flexibility when it comes to binding the data to UI Controls, like the Data Grid, which is the cornerstone of pretty much all User Interfaces these days.  But I can also bind Arrays of PONO's to a DataGrid as well, but I loose the relational aspect of the DataSet, that provides me with drill down functionality with minimal of effort.

As mixed technology projects become the norm, rather than the exception, there will be, I hope, a growth in the appropriate glue technology that allows the two technolgies to talk to each other.  WebServices is a start, but lacks some of the functionality required to build trading systems, i.e. Realtime data feeds direct to the desktop ( this requires push, not pull ). Janeva is another technology that allows C# objects to talk directly to J2EE objects, this is acheived by providing an alternative Remoting implementation that supports this communication ( worth a look ).

More to come later .....

 


Feedback

# re: DataSet's .Net, Java and Hibernate

Gravatar There's absolutely no reason why you should lose the "relational drill down" functionality with PONOs, as long as relations also implement the necessary interfaces. NHibernate, and most other .NET O/R Mappers, should handle this for you. 12/29/2004 10:18 AM | Paul Wilson

# re: DataSet's .Net, Java and Hibernate

Gravatar Did you happen to read this article in MSDN.
http://msdn.microsoft.com/webservices/building/default.aspx?pull=/library/en-us/dnservice/html/service02112003.asp

12/30/2004 2:12 AM | Teucer

# re: DataSet's .Net, Java and Hibernate

Gravatar Thanks for the article, the issue is that the article does not really give any direction as far as J2EE backend's are concerned, they discuss web services from a .Net perspective and do not address what's at the heart of my issue, and that is the .Net and J2ee interoperability and if dataset's can play an important part in this. 12/30/2004 10:19 AM | David lattimore-Gay

# re: DataSet's .Net, Java and Hibernate

Gravatar Interoperating between Java and .NET is a very interesting issue. Although Java and .NET share the same fundamental concept about OOP which allows us to easily serialize and deserialize classes between platforms, they have different models in storing data.

I agreed with David that DataSet is very powerful but there is no equivalent in Java. There are a couple ways to work around
1. Use DataSet on .NET side while using POJO on Java side (use typed dataset... take a look at http://msdn.microsoft.com/msdnmag/issues/03/04/XMLFiles/ for more information)
2. Use PONO on .NET side and use POJO on Java side.
3. Totally use XmlElement instead.

The selection would depend on the requirement of the project. On a slow moving project (big project with full SDLC process), I think (2) should be the best solution. However, if the project is very rapid.. XP stuff, (1) might be more compelling since .NET side would be dynamic enough to tolerate changes in data structure.

Just my 0.02 USD
1/2/2005 9:46 PM | Nat

# re: DataSet's .Net, Java and Hibernate

Gravatar this is crap 3/20/2008 2:19 PM | ravi

Post a comment





 

 

 

Copyright © David Lattimore-Gay