home *** CD-ROM | disk | FTP | other *** search
/ PC Professionell 2004 December / PCpro_2004_12.ISO / files / webserver / xampp / xampp-cocoon-addon-1.4.9-installer.exe / databases.xml < prev    next >
Encoding:
Extensible Markup Language  |  2004-07-12  |  5.4 KB  |  145 lines

  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3.   Copyright 1999-2004 The Apache Software Foundation
  4.  
  5.   Licensed under the Apache License, Version 2.0 (the "License");
  6.   you may not use this file except in compliance with the License.
  7.   You may obtain a copy of the License at
  8.  
  9.       http://www.apache.org/licenses/LICENSE-2.0
  10.  
  11.   Unless required by applicable law or agreed to in writing, software
  12.   distributed under the License is distributed on an "AS IS" BASIS,
  13.   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14.   See the License for the specific language governing permissions and
  15.   limitations under the License.
  16. -->
  17. <!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V1.0//EN" "document-v10.dtd">
  18.  
  19. <document>
  20.  
  21.   <header>
  22.     <title>Database Access</title>
  23.     <authors>
  24.       <person name="Christian Haul" email="haul@apache.org"/>
  25.     </authors>
  26.   </header>
  27.  
  28. <body>
  29.  
  30.     <s1 title="Introduction">
  31.       <p>
  32.         Publishing dynamic content or creating web-applications 
  33.         eventually involves database access. Apache Cocoon
  34.         offers a number of different approaches to access
  35.         (object) relational and XML databases. This document provides
  36.         an overview of the different ways to access (object)
  37.         relational databases.
  38.       </p>
  39.       <p>
  40.         This document will not explain how to set up database
  41.         connectivity with Apache Cocoon. For this, see <link
  42.           href="../../developing/datasources.html">here.</link>
  43.       </p>
  44.       <p>
  45.         Basically, there are three different approaches available:
  46.         <link href="actions.html">Actions,</link> <link
  47.           href="../xsp/logicsheet-concepts.html">logicsheets,</link>
  48.         and <link href="sitemap.html">transformers.</link> Each approach has
  49.         its pros and cons. 
  50.       </p>
  51.     </s1>
  52.  
  53.     <s1 title="Actions Approach">
  54.       <p>
  55.         <link href="actions.html">Actions</link> are code to be executed
  56.         during pipeline setup. The outcome of an action can change how a pipeline is
  57.         assembled. For example, a pipeline may produce an alternative
  58.         page to display upon failure of a particular database operation.
  59.       </p>
  60.       <p>
  61.         Actions are especially great for inserting, changing, or deleting data. 
  62.         Employing the pipeline-switching features of actions will simplify your 
  63.         pages. Such actions are concerned with only one view: either the success
  64.         or failure of an operation.
  65.       </p>
  66.       <p>
  67.         Actions can be useful, even when data is not provided by users.
  68.         For example, you could store tracking information in a database in
  69.         a central location without the need to modify every page.
  70.       </p>
  71.       <p>
  72.         Database actions can read and return data from a database. This is
  73.         useful when the pipeline assembly depends upon such data. It's also
  74.         useful when setting up an environment for XSP processing.
  75.       </p>
  76.       <p>
  77.         Once the database meta data is captured in an XML descriptor file, 
  78.         making use of these actions is simply a matter of placing them in a pipeline. 
  79.         This is a major advantage of the action approach. No programming is
  80.         required, not even SQL query writing.
  81.       </p>
  82.       <p>
  83.         For more detailed information, read:  <link
  84.           href="../actions/database-actions.html">Database Actions</link>.
  85.       </p>
  86.     </s1>
  87.  
  88.     <s1 title="ESQL Logicsheet Approach">
  89.       <p>
  90.         The use of logicsheets is limited to XSPs. ESQL is currently available
  91.         for Java-based XSPs. Its interface is modeled largely on
  92.         JDBC. Thus, it is advantageous to be familiar with JDBC.
  93.       </p>
  94.       <p>
  95.         ESQL is great when reading data from a database. However, it is less attractive
  96.         to use when it has to react to operation failures. This is due to the fact
  97.         that it adds a layer of complexity to an XSP file, making it
  98.         more difficult to understand and maintain.
  99.       </p>
  100.       <p>
  101.         Complex layouts of the data are easy to achieve. ESQL allows
  102.         the arbitrary nesting of queries and connections. It also provides support for
  103.         stored procedures and complex data types. ESQL provides a means to 
  104.         create a structured representation of the database data with a single tag. 
  105.         This is useful when generating reports to use
  106.         with other XML-aware software or to be formated with XSL or CSS2.
  107.         XML data can be retrieved from the
  108.         database and included in the output. With some supported database
  109.         management systems, ESQL supports skipping part of the
  110.         resultset as well as limiting the result. 
  111.         Given the full power of Java available within XSP,
  112.         any processing of the data is possible. 
  113.       </p>
  114.       <p>
  115.         For more detailed information, read:  <link
  116.           href="../xsp/esql.html">ESQL Taglib</link>.
  117.       </p>
  118.     </s1>
  119.  
  120.     <s1 title="SQL Transformer Approach">
  121.       <p>
  122.         An approach using the SQL transformer can be combined with any kind
  123.         of page. This will result in slightly cleaner pages as you don't need
  124.         some of the setup that an ESQL approach requires.
  125.       </p>
  126.       <p>
  127.         On the other hand, it is more or less impossible to react to operation
  128.         failures. This is due to the fact that the pipeline is already assembled 
  129.         and the necessary logic to handle such failures is not
  130.         available inside the SQL transformer, unless of course, you are willing
  131.         to write a custom transformer.
  132.         Thus, the transformer approach is best for retrieving data. Creating
  133.         an XML representation of the query result is even simpler than when
  134.         using the ESQL logicsheet. The transformer also supports stored procedures.
  135.         No programming is required, apart from writing SQL.
  136.       </p>
  137.       <p>
  138.         For more detailed information, read: <link
  139.           href="../transformers/sql-transformer.html">SQL Transformer</link>.
  140.       </p>
  141.     </s1>
  142.  
  143. </body>
  144. </document>
  145.