This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

A Modest Proposal

 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This belongs either here or Java intermediate, but I decided to put here since it relates strongly to JDBC.
It has occured to me for a while that JDBC, JNDI and some other operations (connections, files, urls?) can be modeled as data access operations. That is, they obtain a connection of some sort of data source, they provide details on (for example) a search and recieve results.
In the previous company I worked for we had a rather nice internal tool for abstracting persistence operations but it was still very database oriented.
What I'm currently interested in seeing is if we can treat all the data sources via a common interface (in a similar way to how JDBC provides an interface to database classes) so that it isn't even necessary to know at the business level in what sort of store the data is in.
(My problem is that since it's such a big job I'm going to try attempt it during a project I'm contracting on so they get to pay for it. Ambitious? Maybe)
Not much of a question so far, but more of a call to anyone who's had a think about the JDBC architecture and wants to argue about the merits or extending it a level further.

Dave.
Rule six: The winning team will be the first team that wins.
 
Bjarki Holm
Author
Ranch Hand
Posts: 65
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi David!
The concept of a standardized method for accessing heterogeneous data sources is not new. Actually, there is already a Java API being developed for this purpose, the JDO (Java Data Objects) API. In short, JDO provides the Java programmer with an object interface to data stores, which means that data objects can automatically be manipulated as Java objects, without any coding required by the application developer (the mapping of data objects - such as database tables - to Java objects is achieved by the JDO vendor in question). This means that the details of the underlying data source - be it a relational database, an enterprise mainframe system or serialized data in a file system -are hidden from the application, which needs only concern with the business logic, and not the persistence logic. More information on JDO is available at http://access1.sun.com/jdo, or this week's book giveaway, Professional Java Data (I must do some promo stuff, won't I?).
You also asked about methods to standardize access to files, URLs, etc. I recommend that you have a look at the J2EE JavaDoc, at http://java.sun.com/j2ee/j2sdkee/techdocs/api/index.html, and read about the <code>javax.activation.DataSource</code> interface. This interface provides standard methods for accessing an abstract data source. For example, it is implemented by <code>javax.activation.FileDataSource</code> and <code>javax.activation.URLDataSource</code>, for access to files and URLs, respectively.
I hope this helped you somewhat.
Cheers,
Bjarki Holm
Author of Professional Java Data
[This message has been edited by Bjarki Holm (edited June 12, 2001).]
 
Nigel Browne
Ranch Hand
Pie
Posts: 682
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am currently working on a Grid project, and although there are standard ways of defining data, theyt are not widely used. I look forward to a Java API which deals with this issue it could solve a lot of problems.
 
Bjarki Holm
Author
Ranch Hand
Posts: 65
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Nigel,
check out the JDO home page at http://access1.sun.com/jdo. It contains the specification for the JDO model, reviews from external parties, implementations, and more. JDO is definitely the answer you are looking for ;)
Cheers,
------------------
Bjarki Holm
Author of Professional Java Data
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic