You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@turbine.apache.org by jo...@apache.org on 2001/06/29 21:33:33 UTC

cvs commit: jakarta-turbine/docs/howto peers-howto.html

jon         01/06/29 12:33:31

  Modified:    xdocs/howto peers-howto.xml
               docs/howto peers-howto.html
  Log:
  adding more information/docs to the peer howto
  
  Revision  Changes    Path
  1.8       +73 -0     jakarta-turbine/xdocs/howto/peers-howto.xml
  
  Index: peers-howto.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine/xdocs/howto/peers-howto.xml,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- peers-howto.xml	2001/06/27 21:19:36	1.7
  +++ peers-howto.xml	2001/06/29 19:33:23	1.8
  @@ -36,6 +36,79 @@
   
   </section>
   
  +<section name="Capabilities">
  +
  +<source><![CDATA[
  +> I'm looking for an O-R layer for the next version of our system;
  +> somebody recommended that I evaluate Peers.  I've identified 7
  +> structural cases and a few other criteria that I'd like in an O-R tool.
  +> Can an experienced Peers user or developer tell me how well it handles
  +> these situations?
  +>
  +> O-R structures:
  +> 1) simple (1 class, 1 table)
  +
  +You use a tool called Torque to generate Peer classes for you.  There
  +are 4 classes for each table.  Base<table-name>Peer,  Base<table-name>,
  +<table-name>Peer and Base<table-name>
  +
  +The Base* classes contains all the functionality and should not be
  +change. The other two classes are empty and this is where your
  +application business logic goes.  If you regenerate with torque only the
  +Base* classes changes. This allows you to change the schema, but still
  +keep your existing code.
  +
  +> 2) 1:n
  +
  +Torque will generate methods for you to access the relevant objects.
  +
  +For example Category and Item.  Category.getItems() will give all the
  +items for a category or Item.getCategory() will give the associated
  +Category for an Item.
  +
  +Torque also generates methods for joining all objects with less db hits
  +as to improve performance.
  +
  +> 3) n:m
  +
  +You can use the methods generated by Torque for this, but it would
  +probably be more efficient to use a Criteria object.  Joins are very
  +easy to do and you'll find that you'll be able to do complex multi-table
  +joins without a problem.
  +
  +> 4) self join 1:n (object trees)
  +
  +Same as (3).  I have very efficient code that loads a tree from a table
  +into a in memory tree representation with a single db hit.  If you're
  +interested I can give it to you.
  +
  +> 5) self join n:m (object maps)
  +
  +Same as (3).
  +
  +> 6) simple inheritance (S extends B, each maps to a table with a shared
  +> primary key)
  +
  +I don't think there is any support for this at the moment, but it could
  +probably be done.
  +
  +> 7) polymorphic inheritance (S and T extend B, the application works with
  +> a collection of B)
  +
  +Same as (6)
  +
  +> The only other real requirement I've got is good documentation.
  +
  +As an added bonus Peer allows you to create objects from a standard SQL
  +query.  This gives you the opportunity to do things by hand wherever you
  +might find Peers lacking (which isn't a lot :-)
  +
  +The documentation is coming along nicely, but there is room for
  +improvement. We'll help you with Peer if you help out with docs :-)
  +]]></source>
  +
  +</section>
  +
   <section name="Database Maps">
   
   <p>
  
  
  
  1.8       +100 -0    jakarta-turbine/docs/howto/peers-howto.html
  
  Index: peers-howto.html
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine/docs/howto/peers-howto.html,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- peers-howto.html	2001/06/29 18:59:55	1.7
  +++ peers-howto.html	2001/06/29 19:33:28	1.8
  @@ -177,6 +177,106 @@
                                                   <table border="0" cellspacing="0" cellpadding="2" width="100%">
         <tr><td bgcolor="#525D76">
           <font color="#ffffff" face="arial,helvetica,sanserif">
  +          <a name="Capabilities"><strong>Capabilities</strong></a>
  +        </font>
  +      </td></tr>
  +      <tr><td><br/></td></tr>
  +      <tr><td>
  +        <blockquote>
  +                                        <div align="left">
  +    <table cellspacing="4" cellpadding="0" border="0">
  +    <tr>
  +      <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  +      <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  +      <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  +    </tr>
  +    <tr>
  +      <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  +      <td bgcolor="#ffffff"><pre>
  +&gt; I'm looking for an O-R layer for the next version of our system;
  +&gt; somebody recommended that I evaluate Peers.  I've identified 7
  +&gt; structural cases and a few other criteria that I'd like in an O-R tool.
  +&gt; Can an experienced Peers user or developer tell me how well it handles
  +&gt; these situations?
  +&gt;
  +&gt; O-R structures:
  +&gt; 1) simple (1 class, 1 table)
  +
  +You use a tool called Torque to generate Peer classes for you.  There
  +are 4 classes for each table.  Base&lt;table-name&gt;Peer,  Base&lt;table-name&gt;,
  +&lt;table-name&gt;Peer and Base&lt;table-name&gt;
  +
  +The Base* classes contains all the functionality and should not be
  +change. The other two classes are empty and this is where your
  +application business logic goes.  If you regenerate with torque only the
  +Base* classes changes. This allows you to change the schema, but still
  +keep your existing code.
  +
  +&gt; 2) 1:n
  +
  +Torque will generate methods for you to access the relevant objects.
  +
  +For example Category and Item.  Category.getItems() will give all the
  +items for a category or Item.getCategory() will give the associated
  +Category for an Item.
  +
  +Torque also generates methods for joining all objects with less db hits
  +as to improve performance.
  +
  +&gt; 3) n:m
  +
  +You can use the methods generated by Torque for this, but it would
  +probably be more efficient to use a Criteria object.  Joins are very
  +easy to do and you'll find that you'll be able to do complex multi-table
  +joins without a problem.
  +
  +&gt; 4) self join 1:n (object trees)
  +
  +Same as (3).  I have very efficient code that loads a tree from a table
  +into a in memory tree representation with a single db hit.  If you're
  +interested I can give it to you.
  +
  +&gt; 5) self join n:m (object maps)
  +
  +Same as (3).
  +
  +&gt; 6) simple inheritance (S extends B, each maps to a table with a shared
  +&gt; primary key)
  +
  +I don't think there is any support for this at the moment, but it could
  +probably be done.
  +
  +&gt; 7) polymorphic inheritance (S and T extend B, the application works with
  +&gt; a collection of B)
  +
  +Same as (6)
  +
  +&gt; The only other real requirement I've got is good documentation.
  +
  +As an added bonus Peer allows you to create objects from a standard SQL
  +query.  This gives you the opportunity to do things by hand wherever you
  +might find Peers lacking (which isn't a lot :-)
  +
  +The documentation is coming along nicely, but there is room for
  +improvement. We'll help you with Peer if you help out with docs :-)
  +</pre></td>
  +      <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  +    </tr>
  +    <tr>
  +      <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  +      <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  +      <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  +    </tr>
  +    </table>
  +    </div>
  +                            </blockquote>
  +        </p>
  +      </td></tr>
  +      <tr><td><br/></td></tr>
  +    </table>
  +                                                <table border="0" cellspacing="0" cellpadding="2" width="100%">
  +      <tr><td bgcolor="#525D76">
  +        <font color="#ffffff" face="arial,helvetica,sanserif">
             <a name="Database Maps"><strong>Database Maps</strong></a>
           </font>
         </td></tr>
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-dev-help@jakarta.apache.org