cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Donald Ball <ba...@webslingerZ.com>
Subject Re: [midgard-dev] Formatting engine for Midgard
Date Tue, 20 Jun 2000 06:01:21 GMT
On Thu, 15 Jun 2000, Jukka Zitting wrote:

> [The following is mostly of interest as a possible database access layer for
> Cocoon.]
> 
> For example, instead of using direct SQL like in the example:
> 
>   <query connection="foo_connection">
>     select name,number,message from foo_table order by name
>   </query>
> 
> you could use a more high-level construct like:
> 
>   <list what="messages" order="name" connection="foo_connection"/>
> 
> This way the database is handled only as an abstract repository of objects. It
> would be quite a lot easier to change the details of the underlying database
> storage.

You're right, there are likely to be some benefits to this approach. I've
been using castor (http://castor.exolab.org/) some for JDO/OQL stuff -
I've written a database editor for cocoon using it and have been toying
around with a DTD for using it for database display access as well. I'd be
interested to see how you would compare the two projects. I've found
castor to be quite solid and easy to program with, but hard to get started
with (you have to write a sql schema, a set of java objects, and a mapping
file) and lacking in some important features (many-to-many relationship
support). Those deficiencies are being addressed, but they're there.

> I know this is quite easy to do with XSP in individual cases, but a
> more generic solution would be nicer. You could have an XML file that
> contains a description of the database structure. The Processor would
> read this file, generate and execute the required SQL commands, and
> present the output embedded in semantic tags without references to
> low-level database fields.

Could be nicer, sure. I see niches for all sorts of approaches - simple
sql for simple stuff, castor/midgard for well-defined complex stuff,
custom xsp taglibs for complex stuff that's hard to model in OO.

- donald


Mime
View raw message