cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Fagerstrom <dani...@nada.kth.se>
Subject Re: SQLTransformer
Date Sun, 04 Sep 2005 09:46:24 GMT
Torsten Schlabach wrote:
> Hi all,
> 
> I have done some work with and on SQLTransformer recently and came across
> one fundamental question, that I would appreciate some views on.
...
> In situations, where you would want to build a more generic data browsing
> application that makes use of the database metadata to extract information
> about the data (in ohther words: you don't know the fieldnames upfront) it
> would be much cleaner if the XML generated would read:
...

This have been discussed for years but not resulted in much code. What
you ask for can rather easily be done in ESQL (an XSP library), IIRC.
But XSP is hard to maintain and develop new functionality in due to its 
design, so we don't recomend people to use it anymore.

There have also been various proposals to move ESQL functionality to the
SQLTransformer, but no action.

One camp have been so entusiastic about OR tools that they don't think
that there is a need for things like the SQLTransformer at all,
Hibernate should be used instead.

When we refactored JXTG, I designed it in such a way so that it should
be easy to add new sets of instructions to it, I did this in particular
to be able to reimplement ESQL as instruction tags usable within JXTG.
Then we had a long debate where some people where strongly against
allowing such things in JXTG, see
http://wiki.apache.org/cocoon/Templates#head-21328543e917fa0537016fe30cb85c3ee42fc68a 

for links to the discussions.

In http://marc.theaimsgroup.com/?l=xml-cocoon-dev&m=110207408722028&w=2
Sylvain give some ideas about how to replace ESQL and in
http://marc.theaimsgroup.com/?l=xml-cocoon-dev&m=110202403115200&w=2
Stefano gives his view. Both suggest, from somewhat different
perspectives that the query should be prepared in the controler (e.g.
flowscripts) and that the result set should be itereated through in the
view (e.g. JXTG).

Now, having written plenty of webapps that use tons of queries performed
in the SQLTransformer, I'm of the opinion that the SQLTransformer is a
rather convenient way of handling low to intermediate compleity SQL
applications. And it would be even more convenient to embed the queries
in JXTG. And it would be fairly easy to implement the needed instructions.

                        --- o0o ---

To sum up, I find it rather unsatisfying that we don't have "modern" and
convenient solution for simple SQL reporting. I'm certain that OR tools
are fantastic in some cases, but they are IMO overkill for simple
reporting applications. Both ESQL and the SQLTransformer are somewhat
unconvenient to use, although in different ways.

IMO we should either provide JXTG instructions for SQL reporting or give
some kind of support and examples on how to use SQL with query
preparation in the controler and report construction in the view layer,
(following Sylvain's or Stefano's sugestions).

WDYT?

/Daniel


Mime
View raw message