Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Fad of the month Java data access question.

Re: Fad of the month Java data access question.

From: Hans Forbrich <forbrich_at_telusplanet.net>
Date: Tue, 01 Apr 2003 15:47:46 GMT
Message-ID: <3E89B3B6.FD3F4867@telusplanet.net>


Telemachus wrote:

> <snip> JDO,DAO,JDBC,EJB <snip>

> Question : Which ones are currently in serious use out there and have a good
> chance of actually being around in a few years ?

IMHO, a 'serious' Java shop would not simply select one of the mentioned technologies over the others. Like any other tool in the toolbox, you either chose the right one for the job or you end up using the 'universal vice grip and hammer combination' because that's all you know.

(Of course, todays programmers really don't have the time to learn the tools of the trade. Heck, they don't even have time to write more than straight-line prototype code. Forget error handling .... )

These are not mutually exclusive technologies. However, there are reasons and places to use each. The following URLs obtained through Google. Hopefully the site and my interpretation helps:

  1. JDBC (from http://java.sun.com/products/jdbc) is the fundemental data access API. It appears to be the basic "if all else fails" but somewhat cumbersome technique. Almost like writing low level code. Any programmer who learns the others and doesn't know JDBC should be sent home.
  2. JDO (from http://www.jdocentral.com/) us a J2SE (Java 2 Standard Edition) extension. J2SE (as compared to J2EE , or Java 2 Enterprise Edition) seems mainly oriented towards a single, standalone app or the client in a C/S environment. Use this when you use J2SE environment, not J2EE environment!
  3. DAO (from http://java.sun.com/blueprints/patterns/DAO.html) is a specific design pattern (or technique) in the J2EE environment. Design patterns seem to be templates, code techniques and even code snippets, published to assist a Java programmer in accomplishing a specific type of task quickly without reinventing the wheel. I see this as an effective shortcut in a J2EE/non-EJB environment.
  4. EJB (from http://java.sun.com/products/ejb/) is the definition and implementation of a componment technology and a framework. In order to avoid reinventing basic code (like database connectivity, security, mail, and so on) an EJB compliant environment provides all the basics, or allows them to be 'clipped in', and simply invoked through configuration. IMHO, it is a very ambitious design pattern that is reasonably successful for 'assembly line' programming. EJBs have their place ... I strongly encourage their use (when appropriate) ... learn about appropriate from the book "Mastering EJB" available through http://www.theserverside.com

Which to use? Depends on the problem you are trying to solve!

/Hans
(Programmers have more religious fervor than priests. But priests only want to save your soul, programmers want to save your computer.) Received on Tue Apr 01 2003 - 09:47:46 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US