You are viewing a plain text version of this content. The canonical link for it is here.
Posted to docs@cocoon.apache.org by st...@outerthought.org on 2003/10/07 12:00:07 UTC
[WIKI-UPDATE] GT2003Stefano GT2003Christian BlocksUseCases SitemapPatterns People GetTogether2003Notes Tue Oct 7 12:00:07 2003
Page: http://wiki.cocoondev.org/Wiki.jsp?page=GT2003Stefano , version: 3 on Tue Oct 7 10:01:15 2003 by Stefanomazzocchi
- Says he could not come last year because of ApacheCon, "That Sucked!!"
? ^^^^^^^^^^^^^^^^^
+ Says he could not come last year because of ApacheCon.
? ^
-
Page: http://wiki.cocoondev.org/Wiki.jsp?page=GT2003Christian , version: 1 on Tue Oct 7 09:10:16 2003 by BertrandDelacretaz
New page created:
+ Talk by Christian Haul at the 2003 GetTogether: Integrating Databases with Cocoon
+
+ Raw notes taken collaboratively during the talk.
+
+ !!Christian Haul discusses connection relational databases to Cocoon
+
+ He's mostly involved with ESQL and database actions in Cocoon
+
+ ! Ways to access databases in Cocoon
+ *Esql
+ *Transformer
+ *Actions
+ *Database Actions
+ *Object Relational Bridge
+
+ You can write JDBC code directly from your own components, or use Avalon connection Pools, (copy your DB driver to WEB-INF/lib, Set up a datasource in your cocoon.xconf) for access to Datasources for J2EE, Oracle, Informix, etc.
+
+ Incompatible API changes in JDBC between V2 and V3 - causes problems if one mixes versions. 2.1 reduces connection problems
+
+ ! Checking connections
+ *See Christian's slide later on, basically explains the possible ways to debug connection problems.
+ *Look at the beginning of the log, because the connection would fail at startup
+
+ ! Example tables
+ Examples will be based on users, users_groups and groups tables with simple relations.
+
+ ! Using JDBC directly
+ Explains Java scenario to access JDBC data sources in Cocoon - gives you complete control but you do not leverage the framerwork.
+
+ ! ESQL
+ * XSP logicsheet, thin layer over JDBC
+ * You need to know about JDBC to make effective use of ESQL
+ * (Christian, showing some samples from Cocoon Dist)
+ * Warns people about SQL injection security problems (a simple Google search will help)
+ * Most everything (connection, query, etc) can be dynamic in ESQL.
+ * Paged display supported.
+ * Conditional tags (only do this if there were no results etc.)
+ * Good for fast Prototyping
+ * You can use ESQL for developing custom actions (XSPActions)
+
+ Good summary + advices slides on ESQL, keepers!
+
+ Chris recommends using ESQL for reading data only, don't do updates.
+
+ Caveat about ESQL page size, compile limit of 64 K Java class
+
+ ! SQL Transformer
+
+ * No compilation involved, so a bit slower
+ * Query can come from different sources (XInclude)
+ * Can be fed values from the Sitemap
+ * Results are in XML (obviously) will be processed by a subsequent transformer
+ * Not cacheable
+ * Better SoC (than ESQL)
+ * No computations in the query
+ * difficult to use for modifying data
+
+
+ ! Database Actions
+ * separate file for metadata
+ * 'if' behaviour for the sitemap
+ * New 'modular' actions use input modules
+ * several Actions use SQL access for you behind the scenes, where you don't have to write SQL Queries
+ * results can be used via output modules
+ * update, delete, select
+ * auto increments
+ * multiple rows, tables
+ * easy prototyping
+
+ * can make the sitemap more complex
+
+ ! Object Relational Bridges
+ * Actions on steroids??
+ * OJB (example in CVS), Hibernate, Castor etc.
+ * Separate connection pool outside cocoon
+
+ * You generally get a Bean from one of these tools, these can be accessed via Castor, JXTemplate etc.
+
+ *How to use it
+ ** get a connection
+ ** make a query
+ ** get a Bean
+ ** display/modify the Bean
+
+ * Advantages
+
+ ** Integrate well with Woody + Flow
+ ** no need to write SQL queries
+ ** useable outside of Cocoon
+ ** meta data available through xDoclet
+
+ * Using from Flow
+ ** call any java code
+ ** access a persistence layer
+ ** Database.js in petstore sample
+ ** Legacy access to Actions
+
+
+ Make sure to have a look at Chris's summary pages on the various technologies (summary + advice), they're real good!
+
+ We should talk Christian into writing a summary of his presentation for our docs. A good summary of the various DB access technologies would be great (or is there one already).
+
+ ! Audience Questions
+ * How can caching be applied to databases?
+ ** Caching is not really possible at the database level, although individual pipelines can be configured to be cachable by the browser.
+
+
+
+
+
+
+
Page: http://wiki.cocoondev.org/Wiki.jsp?page=BlocksUseCases , version: 5 on Tue Oct 7 09:56:11 2003 by 157.193.102.50
+ I want use a block to convert a file, which is used for my own
+ components. For example in my vision, I have a Chaperon block,
+ which offers a parser transformer, which parses a text within
+ a xml document, and a text generator, which produce a SAX stream.
+
+ I also want to offer with a Chaperon block a pipeline, which converts
+ a grammar as text format to xml version of the grammar.
+
+ !myblock.block
+ {{{
+ <map:transform type="parser" src="chaperon:/mygrammar.txt"/>
+ }}}
+
+ !chaperon.block
+ {{{
+ <map:pipeline>
+ <map:match pattern="*.txt">
+ [transform txt to xml]
+ </map:match>
+ </map:pipeline>
+ }}}
+
+ But the problem is that the chaperon block need access to the files in myblock
+ to transform them. Is there any possible way to do this??!
+
+ Stephan Michels.
+
+ ----
+
+ !! Blocks Use Case #4:
+
Page: http://wiki.cocoondev.org/Wiki.jsp?page=SitemapPatterns , version: 16 on Tue Oct 7 09:31:39 2003 by AndreasHartmann
+ !DirectoryGenerator and CIncludeTransformer
+ * aggregate a set of files from a certain directory
+
Page: http://wiki.cocoondev.org/Wiki.jsp?page=People , version: 184 on Tue Oct 7 09:58:01 2003 by 157.193.102.50
+
+ * [Stephan Michels] -- Cocoon committer.
Page: http://wiki.cocoondev.org/Wiki.jsp?page=GetTogether2003Notes , version: 8 on Tue Oct 7 09:52:41 2003 by BertrandDelacretaz
- Reports brought to you by [Jeremy|JeremyQuinn], [Bertrand|BertrandDelacretaz], [Steven|StevenNoels] and...(expecting more people to join this effort;-)
+ Reports brought to you by [Jeremy|JeremyQuinn], [Bertrand|BertrandDelacretaz], [Steven|StevenNoels], Rogier Peters, [Stefano|Stefanomazzocchi] and...(expecting more people to join this effort;-)
? +++++++++++++++++++++++++++++++++++++++++++