Summary
Dynamic content publishing is an everyday reality on the Web. To meet this demand, any mature server framework must provide functionality for working with information held in relational databases. This tutorial has reviewed the main components in Cocoon 2 that support this functionality.
The initial section of the tutorial contained detailed instructions for configuring data sources in Cocoon 2, allowing the server to manage connection pools on behalf of individual applications. This configuring involves installing and loading a JDBC driver and configuring various resource management options for the connection pool.
The tutorial then progressed to describing the basic elements in the ESQL logicsheet. This logicsheet provides the expected range of functionality required for working with database data, including selecting, inserting, updating, and deleting records. A number of examples based around a sample database illustrated this functionality. In particular, various options for mapping relational data into XML documents were discussed. These included options for element naming, processing query results with custom logic, and creating hierarchical documents using nested queries and data grouping.
Lastly, to ensure data integrity in user-submitted data, the tutorial reviewed the functionality provided by the Form Validator Action and its supporting logicsheet. These components provide a means to declaratively associate validation rules with HTTP request parameters.


