db-jdo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From an...@apache.org
Subject svn commit: r1432659 [12/12] - in /db/jdo/site: ./ src/ src/site/ src/site/resources/ src/site/resources/images/ src/site/resources/releases/ src/site/xdoc/ src/site/xdoc/guides/ src/site/xdoc/releases/
Date Sun, 13 Jan 2013 17:05:18 GMT
Added: db/jdo/site/src/site/xdoc/why_jdo.xml
URL: http://svn.apache.org/viewvc/db/jdo/site/src/site/xdoc/why_jdo.xml?rev=1432659&view=auto
==============================================================================
--- db/jdo/site/src/site/xdoc/why_jdo.xml (added)
+++ db/jdo/site/src/site/xdoc/why_jdo.xml Sun Jan 13 17:05:15 2013
@@ -0,0 +1,166 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<document xmlns="http://maven.apache.org/XDOC/2.0"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://maven.apache.org/XDOC/2.0 http://maven.apache.org/xsd/xdoc-2.0.xsd">
+    <properties>
+        <title>Why JDO ?</title>
+    </properties>
+
+    <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>
+            <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. 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
API. 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 2002 (JDO1), being upgraded in 2006 (JDO2)
and
+                    is in the process of being developed further (JDO2.1) by Apache JDO</li>
+                <li>You can use <b>JPA</b>, a standardised persistence
API, and part of the EJB3 specification. This also allows you to
+                    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. It really
+                    only allows persistence to RDBMS datastores. If you want to persist to
other datastores
+                    you should consider JDO.</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 (e.g Hibernates
own API, TopLinks own API, iBatis, Castor etc).
+                    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>
+
+            <table>
+                <tr>
+                    <th>Feature</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 ORM</th>
+                </tr>
+                <tr>
+                    <td>Standards-Driven</td>
+                    <td><img alt="" src="images/icon_success_sml.gif" border="0"/></td>
+                    <td><img alt="" src="images/icon_success_sml.gif" border="0"/></td>
+                    <td><img alt="" src="images/icon_success_sml.gif" border="0"/></td>
+                    <td><img alt="" src="images/icon_success_sml.gif" border="0"/></td>
+                    <td><img alt="" src="images/icon_error_sml.gif" border="0"/></td>
+                </tr>
+                <tr>
+                    <td>Choice of datastores</td>
+                    <td><img alt="" src="images/icon_error_sml.gif" border="0"/></td>
+                    <td><img alt="" src="images/icon_success_sml.gif" border="0"/></td>
+                    <td><img alt="" src="images/icon_error_sml.gif" border="0"/></td>
+                    <td><img alt="" src="images/icon_error_sml.gif" border="0"/></td>
+                    <td><img alt="" src="images/icon_success_sml.gif" border="0"/></td>
+                </tr>
+                <tr>
+                    <td>Support POJOs</td>
+                    <td><img alt="" src="images/icon_success_sml.gif" border="0"/></td>
+                    <td><img alt="" src="images/icon_success_sml.gif" border="0"/></td>
+                    <td><img alt="" src="images/icon_success_sml.gif" border="0"/></td>
+                    <td><img alt="" src="images/icon_error_sml.gif" border="0"/></td>
+                    <td><img alt="" src="images/icon_success_sml.gif" border="0"/></td>
+                </tr>
+                <tr>
+                    <td>Usable in J2SE</td>
+                    <td><img alt="" src="images/icon_success_sml.gif" border="0"/></td>
+                    <td><img alt="" src="images/icon_success_sml.gif" border="0"/></td>
+                    <td><img alt="" src="images/icon_success_sml.gif" border="0"/></td>
+                    <td><img alt="" src="images/icon_error_sml.gif" border="0"/></td>
+                    <td><img alt="" src="images/icon_success_sml.gif" border="0"/></td>
+                </tr>
+                <tr>
+                    <td>Usable in J2EE</td>
+                    <td><img alt="" src="images/icon_success_sml.gif" border="0"/></td>
+                    <td><img alt="" src="images/icon_success_sml.gif" border="0"/></td>
+                    <td><img alt="" src="images/icon_success_sml.gif" border="0"/></td>
+                    <td><img alt="" src="images/icon_success_sml.gif" border="0"/></td>
+                    <td><img alt="" src="images/icon_success_sml.gif" border="0"/></td>
+                </tr>
+                <tr>
+                    <td>Out of box implementation (1)</td>
+                    <td><img alt="" src="images/icon_error_sml.gif" border="0"/></td>
+                    <td><img alt="" src="images/icon_success_sml.gif" border="0"/></td>
+                    <td><img alt="" src="images/icon_success_sml.gif" border="0"/></td>
+                    <td><img alt="" src="images/icon_error_sml.gif" border="0"/></td>
+                    <td><img alt="" src="images/icon_success_sml.gif" border="0"/></td>
+                </tr>
+                <tr>
+                    <td>Simple to unit test</td>
+                    <td><img alt="" src="images/icon_success_sml.gif" border="0"/></td>
+                    <td><img alt="" src="images/icon_success_sml.gif" border="0"/></td>
+                    <td><img alt="" src="images/icon_success_sml.gif" border="0"/></td>
+                    <td><img alt="" src="images/icon_error_sml.gif" border="0"/></td>
+                    <td><img alt="" src="images/icon_success_sml.gif" border="0"/></td>
+                </tr>
+                <tr>
+                    <td>Dynamic queries</td>
+                    <td><img alt="" src="images/icon_success_sml.gif" border="0"/>
(2)</td>
+                    <td><img alt="" src="images/icon_success_sml.gif" border="0"/></td>
+                    <td><img alt="" src="images/icon_success_sml.gif" border="0"/></td>
+                    <td><img alt="" src="images/icon_error_sml.gif" border="0"/></td>
+                    <td><img alt="" src="images/icon_success_sml.gif" border="0"/></td>
+                </tr>
+                <tr>
+                    <td>Comprehensive ORM</td>
+                    <td><img alt="" src="images/icon_warning_sml.gif" border="0"/></td>
+                    <td><img alt="" src="images/icon_success_sml.gif" border="0"/></td>
+                    <td><img alt="" src="images/icon_warning_sml.gif" border="0"/></td>
+                    <td><img alt="" src="images/icon_error_sml.gif" border="0"/></td>
+                    <td><img alt="" src="images/icon_success_sml.gif" border="0"/></td>
+                </tr>
+                <tr>
+                    <td>Primary Key generation</td>
+                    <td><img alt="" src="images/icon_success_sml.gif" border="0"/>
(2)</td>
+                    <td><img alt="" src="images/icon_success_sml.gif" border="0"/></td>
+                    <td><img alt="" src="images/icon_success_sml.gif" border="0"/></td>
+                    <td><img alt="" src="images/icon_success_sml.gif" border="0"/></td>
+                    <td><img alt="" src="images/icon_success_sml.gif" border="0"/></td>
+                </tr>
+                <tr>
+                    <td>Supports inherited objects</td>
+                    <td><img alt="" src="images/icon_success_sml.gif" border="0"/>
(2)</td>
+                    <td><img alt="" src="images/icon_success_sml.gif" border="0"/></td>
+                    <td><img alt="" src="images/icon_success_sml.gif" border="0"/></td>
+                    <td><img alt="" src="images/icon_success_sml.gif" border="0"/></td>
+                    <td><img alt="" src="images/icon_success_sml.gif" border="0"/></td>
+                </tr>
+                <tr>
+                    <td>Schema Creation</td>
+                    <td><img alt="" src="images/icon_error_sml.gif" border="0"/></td>
+                    <td><img alt="" src="images/icon_success_sml.gif" border="0"/></td>
+                    <td><img alt="" src="images/icon_success_sml.gif" border="0"/></td>
+                    <td><img alt="" src="images/icon_success_sml.gif" border="0"/></td>
+                    <td><img alt="" src="images/icon_success_sml.gif" border="0"/></td>
+                </tr>                
+                <tr>
+                    <td>Existing schema</td>
+                    <td><img alt="" src="images/icon_success_sml.gif" border="0"/></td>
+                    <td><img alt="" src="images/icon_success_sml.gif" border="0"/></td>
+                    <td><img alt="" src="images/icon_success_sml.gif" border="0"/></td>
+                    <td><img alt="" src="images/icon_success_sml.gif" border="0"/></td>
+                    <td><img alt="" src="images/icon_success_sml.gif" border="0"/></td>
+                </tr>
+            </table>
+            <ol>
+                <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>
+            </ol>
+        </section>
+
+    </body>
+</document>



Mime
View raw message