cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Donald Ball <ba...@webslingerZ.com>
Subject Re: App Design Philosophy Rant
Date Wed, 14 Feb 2001 19:21:44 GMT
On Wed, 14 Feb 2001, Markus Bernhardt wrote:

> Lets look for an example at the esql-taglib.
> Pro:
> - Easy to use
> - DB Connection Pooling
> Con:
> - Hard coded, redundant SQL-Statements spreaded all over your source
> - No DB Result Pooling
> - No abstraction of the datasource
> - No cluster support
> - No transaction support
> - No lifecycle management

some of those cons are bogus.

> - Hard coded, redundant SQL-Statements spreaded all over your source

depends on how you use esql. i write my own logicsheets which use esql in
turn, for instance:

<xsl:template match="wzi:get-contacts">
  <esql:execute-query>
    <esql:query>select id,name,phone,email from contacts where client_id =
<esql:parameter><xsl:apply-templates
select="wzi:client-id/*"/></esql:parameter> order by name</esql:query>
    <esql:results>
      <contacts>
        <esql:row-results>
          <contact>
            <id><esql:get-string column="id"/></id>
            <name><esql:get-string column="name"/></name>
            <phone><esql:get-string column="phone"/></phone>
            <email><esql:get-string column="email"/></email>
          </contact>
        </esql:row-results>
      </contacts>
    </esql:results>
  </esql:execute-query>
</xsl:template>

then i just call

<wzi:get-contacts> wherever i want to in my xml pages.

> - No abstraction of the datasource

er... again, i think that depends on how you use xsp/esql. i can change
the template for <wzi:get-contacts> to retrieve the data from whatever
data source i choose.

> - No transaction support

see esql:autocommit

in general, i think you point out some good reasons to take a good look at
J2EE, but i don't agree with all of them.

- donald


Mime
View raw message