db-jdo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From an...@apache.org
Subject svn commit: r586557 [3/3] - in /db/jdo/site: docs/ docs/guides/ docs/releases/ xdocs/
Date Fri, 19 Oct 2007 17:38:52 GMT
Modified: db/jdo/site/xdocs/why_jdo.xml
URL: http://svn.apache.org/viewvc/db/jdo/site/xdocs/why_jdo.xml?rev=586557&r1=586556&r2=586557&view=diff
==============================================================================
--- db/jdo/site/xdocs/why_jdo.xml (original)
+++ db/jdo/site/xdocs/why_jdo.xml Fri Oct 19 10:38:50 2007
@@ -7,30 +7,32 @@
     <body>
         <section name="Why JDO ?">
             <p>
-                The majority of applications need to persist (or store) data during their
lifecycle. There are many ways of doing 
-                this with an application written in Java. 
-            </p>
-            <p>
-                You can handle the persistence (and retrieval) of data yourself using <B>JDBC</B>.
With <B>JDBC</B>, you have the burden
-                of having to write the persistence layer yourself. This gives much control,
but also creates significant work, both in 
-                writing the code but also in testing and maintenance.
-            </p>
-            <p>
-                You could also use <B>J2EE</B>, and persist data using Entity
Beans. With <B>J2EE</B> you hand off the persistence of 
-                your objects to the EJB part of the J2EE server. This simplifies things,
but places a major restriction on your code 
-                in that you have to write your objects as Entity Beans. In addition J2EE
adds layers that are not necessarily required 
-                for your application.
-            </p>
-            <p>
-                You can use a proprietary or non-standards compliant persistence framework
like <B>TopLink</B>, or <B>Hibernate</B> and 
-                persist your plain old Java objects. You will, however, be tied in to their
API and be unable to easily move your system 
-                to an alternative implementation.
-            </p>
-            <p>
-                Alternatively you can use <B>JDO</B>, a standardised persistence
interface. With <B>JDO</B> you can take your plain 
-                old Java objects and just persist them as they are. It is totally transparent
and very little work is required by 
-                the developer.
+                The majority of applications need to persist (or store) data during their
lifecycle. 
+                There are many ways of doing this with an application written in Java.
             </p>
+            <ul>
+                <li>If your datastore is RDBMS you can handle the persistence (and
retrieval) of data yourself
+                    using <B>JDBC</B>. Obviously with this route you have the
burden of having to write the 
+                    persistence layer yourself, but this gives much control, but also creates
significant work,
+                    both in writing the code but also in testing and maintenance.</li>
+                <li>You can use <B>JDO</B>, a standardised persistence
interface. With <b>JDO</b> you can develop
+                    plain old java objects (POJOs) and persist them as they are transparently.
This requires
+                    very little work from the developer. It allows persistence to any type
of datastore in
+                    principle, being designed with flexibility and datastore agnositicity
in mind.
+                    This has been a standard since 2001 (JDO1), being upgraded in 2006 (JDO2)
and
+                    is being developed further currently (JDO2.1)</li>
+                <li>You can use <B>JPA1</B>, a part of the EJB3 specification.
This also allows you to develop
+                    plain old Java objects (POJOs) and persist them using a standardised
API. It's specification
+                    is not as mature or as feature rich as the JDO API, nor does it provide
the flexibility
+                    of using any type of datastore. This was released in 2006 (JPA1) to supercede
EJB2</li>
+                <li><i>If you are stuck with using an EJB2.* architecture you
could use Entity Beans. This 
+                    means that you hand off your objects to the EJB part of the J2EE server.
This simplifies 
+                    things for the developer in some respect but places major restrictions
in that your objects 
+                    have to be Entity Beans.</i></li>
+                <li>You can also use a proprietary persistence API. The disadvantages
of going this route 
+                    are that you cannot easily swap to an alternative implementation of the
API if you hit
+                    problems with your software choice.</li>
+            </ul>
             <p>
                 To give a <I>guide</I>, here are a few important consideration
points when choosing a persistence layer for your application.
             </p>
@@ -38,117 +40,122 @@
             <table>
                 <tr>
                     <th>Feature</th>
-                    <th>JDBC</th>
-                    <th>Custom O/R (1)</th>
-                    <th>EJB (2)</th>
-                    <th>JDO</th>
-                    <th>JPA</th>
+                    <th width="100">JDBC</th>
+                    <th width="100">JDO</th>
+                    <th width="100">JPA</th>
+                    <th width="100">EJB2</th>
+                    <th width="100">Custom O/R (1)</th>
                 </tr>
                 <tr>
-                    <td>Standards-Driven and Portable</td>
-                    <td>Yes</td>
-                    <td>No</td>
-                    <td>Yes</td>
-                    <td>Yes</td>
-                    <td>Yes</td>
+                    <td>Standards-Driven</td>
+                    <td><img src="images/icon_success_sml.gif" border="0"/></td>
+                    <td><img src="images/icon_success_sml.gif" border="0"/></td>
+                    <td><img src="images/icon_success_sml.gif" border="0"/></td>
+                    <td><img src="images/icon_success_sml.gif" border="0"/></td>
+                    <td><img src="images/icon_error_sml.gif" border="0"/></td>
                 </tr>
                 <tr>
                     <td>Choice of datastores</td>
-                    <td>No</td>
-                    <td>Yes</td>
-                    <td>Yes</td>
-                    <td>Yes</td>
-                    <td>No</td>
-                </tr>
-                <tr>
-                    <td>Simple Java objects</td>
-                    <td>Yes</td>
-                    <td>Yes</td>
-                    <td>No</td>
-                    <td>Yes</td>
-                    <td>Yes</td>
-                </tr>
-                <tr>
-                    <td>Out of box implementation (3)</td>
-                    <td>No</td>
-                    <td>Yes</td>
-                    <td>No</td>
-                    <td>Yes</td>
-                    <td>Yes</td>
-                </tr>
-                <tr>
-                    <td>Usable in stand-alone application</td>
-                    <td>Yes</td>
-                    <td>Yes</td>
-                    <td>No</td>
-                    <td>Yes</td>
-                    <td>Yes</td>
-                </tr>
-                <tr>
-                    <td>Usable in J2EE environment</td>
-                    <td>Yes</td>
-                    <td>Yes</td>
-                    <td>Yes</td>
-                    <td>Yes</td>
-                    <td>Yes</td>
+                    <td><img src="images/icon_error_sml.gif" border="0"/></td>
+                    <td><img src="images/icon_success_sml.gif" border="0"/></td>
+                    <td><img src="images/icon_error_sml.gif" border="0"/></td>
+                    <td><img src="images/icon_error_sml.gif" border="0"/></td>
+                    <td><img src="images/icon_success_sml.gif" border="0"/></td>
+                </tr>
+                <tr>
+                    <td>POJOs</td>
+                    <td><img src="images/icon_success_sml.gif" border="0"/></td>
+                    <td><img src="images/icon_success_sml.gif" border="0"/></td>
+                    <td><img src="images/icon_success_sml.gif" border="0"/></td>
+                    <td><img src="images/icon_error_sml.gif" border="0"/></td>
+                    <td><img src="images/icon_success_sml.gif" border="0"/></td>
+                </tr>
+                <tr>
+                    <td>Usable in J2SE</td>
+                    <td><img src="images/icon_success_sml.gif" border="0"/></td>
+                    <td><img src="images/icon_success_sml.gif" border="0"/></td>
+                    <td><img src="images/icon_success_sml.gif" border="0"/></td>
+                    <td><img src="images/icon_error_sml.gif" border="0"/></td>
+                    <td><img src="images/icon_success_sml.gif" border="0"/></td>
+                </tr>
+                <tr>
+                    <td>Usable in J2EE</td>
+                    <td><img src="images/icon_success_sml.gif" border="0"/></td>
+                    <td><img src="images/icon_success_sml.gif" border="0"/></td>
+                    <td><img src="images/icon_success_sml.gif" border="0"/></td>
+                    <td><img src="images/icon_success_sml.gif" border="0"/></td>
+                    <td><img src="images/icon_success_sml.gif" border="0"/></td>
+                </tr>
+                <tr>
+                    <td>Out of box implementation (2)</td>
+                    <td><img src="images/icon_error_sml.gif" border="0"/></td>
+                    <td><img src="images/icon_success_sml.gif" border="0"/></td>
+                    <td><img src="images/icon_success_sml.gif" border="0"/></td>
+                    <td><img src="images/icon_error_sml.gif" border="0"/></td>
+                    <td><img src="images/icon_success_sml.gif" border="0"/></td>
                 </tr>
                 <tr>
                     <td>Simple to unit test</td>
-                    <td>Yes</td>
-                    <td>Yes</td>
-                    <td>No</td>
-                    <td>Yes</td>
-                    <td>Yes</td>
+                    <td><img src="images/icon_success_sml.gif" border="0"/></td>
+                    <td><img src="images/icon_success_sml.gif" border="0"/></td>
+                    <td><img src="images/icon_success_sml.gif" border="0"/></td>
+                    <td><img src="images/icon_error_sml.gif" border="0"/></td>
+                    <td><img src="images/icon_success_sml.gif" border="0"/></td>
                 </tr>
                 <tr>
                     <td>Dynamic queries</td>
-                    <td>Yes (4)</td>
-                    <td>Yes</td>
-                    <td>No</td>
-                    <td>Yes</td>
-                    <td>Yes</td>
+                    <td><img src="images/icon_success_sml.gif" border="0"/> (3)</td>
+                    <td><img src="images/icon_success_sml.gif" border="0"/></td>
+                    <td><img src="images/icon_success_sml.gif" border="0"/></td>
+                    <td><img src="images/icon_error_sml.gif" border="0"/></td>
+                    <td><img src="images/icon_success_sml.gif" border="0"/></td>
+                </tr>
+                <tr>
+                    <td>Comprehensive ORM</td>
+                    <td><img src="images/icon_warning_sml.gif" border="0"/></td>
+                    <td><img src="images/icon_success_sml.gif" border="0"/></td>
+                    <td><img src="images/icon_warning_sml.gif" border="0"/></td>
+                    <td><img src="images/icon_error_sml.gif" border="0"/></td>
+                    <td><img src="images/icon_success_sml.gif" border="0"/></td>
                 </tr>
                 <tr>
                     <td>Primary Key generation</td>
-                    <td>Yes (4)</td>
-                    <td>Yes</td>
-                    <td>No (5)</td>
-                    <td>Yes</td>
-                    <td>Yes</td>
+                    <td><img src="images/icon_success_sml.gif" border="0"/> (3)</td>
+                    <td><img src="images/icon_success_sml.gif" border="0"/></td>
+                    <td><img src="images/icon_success_sml.gif" border="0"/></td>
+                    <td><img src="images/icon_success_sml.gif" border="0"/></td>
+                    <td><img src="images/icon_success_sml.gif" border="0"/></td>
                 </tr>
                 <tr>
                     <td>Supports inherited objects</td>
-                    <td>Yes (4)</td>
-                    <td>Yes</td>
-                    <td>No (5)</td>
-                    <td>Yes</td>
-                    <td>Yes</td>
+                    <td><img src="images/icon_success_sml.gif" border="0"/> (3)</td>
+                    <td><img src="images/icon_success_sml.gif" border="0"/></td>
+                    <td><img src="images/icon_success_sml.gif" border="0"/></td>
+                    <td><img src="images/icon_success_sml.gif" border="0"/></td>
+                    <td><img src="images/icon_success_sml.gif" border="0"/></td>
                 </tr>
                 <tr>
                     <td>Automatic Creation of schema (top-down)</td>
-                    <td>No</td>
-                    <td>Yes</td>
-                    <td>No (5)</td>
-                    <td>Yes</td>
-                    <td>Yes</td>
+                    <td><img src="images/icon_error_sml.gif" border="0"/></td>
+                    <td><img src="images/icon_success_sml.gif" border="0"/></td>
+                    <td><img src="images/icon_success_sml.gif" border="0"/></td>
+                    <td><img src="images/icon_success_sml.gif" border="0"/></td>
+                    <td><img src="images/icon_success_sml.gif" border="0"/></td>
                 </tr>                
                 <tr>
                     <td>Supports existing schema (bottom-up)</td>
-                    <td>Yes</td>
-                    <td>Yes</td>
-                    <td>Yes</td>
-                    <td>Yes</td>
-                    <td>Yes</td>
+                    <td><img src="images/icon_success_sml.gif" border="0"/></td>
+                    <td><img src="images/icon_success_sml.gif" border="0"/></td>
+                    <td><img src="images/icon_success_sml.gif" border="0"/></td>
+                    <td><img src="images/icon_success_sml.gif" border="0"/></td>
+                    <td><img src="images/icon_success_sml.gif" border="0"/></td>
                 </tr>
             </table>
             <ol>
-                <li>refers to products such as Hibernate, TopLink which follow no standard.</li>
-                <li>refers to entity beans for EJB 2.*</li>
-                <li>refers to whether it is necessary to write the persistence yourself
(e.g as with JDBC) or whether you can just 
-                    persist by simple calls.</li>
+                <li>refers to properietary APIs of products such as Hibernate, TopLink.</li>
+                <li>refers to whether it is necessary to write the persistence yourself
(e.g as with JDBC) or 
+                    whether you can just persist by simple calls.</li>
                 <li>requires the developer to write this layer.</li>
-                <li>some advanced EJB containers like Bea Weblogic and IBM Websphere
provide support for primary key generation, 
-                    inherited objects and database schema creation as well.</li>
             </ol>
         </section>
 



Mime
View raw message