db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Fischer <Fisc...@seitenbau.net>
Subject Re: [J2] Vote: Torque schema generation problems - how to proceed?
Date Thu, 09 Dec 2004 16:37:01 GMT


Just a few quick comments to "how to rewrite the generator, if one really
does it"

"Henning P. Schmiedehausen" <hps@intermeta.de> schrieb am 09.12.2004

> Ate Douma <ate@douma.nu> writes:
> >>
> >> Correct. The whole generator has been designed as an additional
> >> wart^W^Waddition to ant. It definitely needs refactoring and
> >> personally I want to look into dropping the whole Velocity
> >> templating/Texen shebang. Texen has given us nothing but headaches
> >> starting with logging and error reporting and ending up with gobbling
> >> up memory like mad... Personally, I believe an XSLT solution would be
> >> nicer but I sorely lack time to do any work on this ATM.

I have worked now for some time with xslt, and I am not sure whether the
generator would get more simple if  it was complete rewritten in xslt. In
the applications I have done so far using xslt, the xml is generated inside
java and is then transfomed by xslt to generate html. In this
configuration, one has the choice to do things either in java or in xslt
(for example, I want to display a special text if the user is admin. Either
I can give the xslt the information "the user is admin" and the stylesheet
decides which text is displayed, or I can decide in java which text to
display and pass it directly to the stylesheet). I have found that it is
almost always better to do things in java and rely on xsltc only for the
very last output formatting (i.e. the second solution in the example). The
main reasons are : 1) java offers much more possibilities than xslt and 2)
it is easier to debug java code than xslt stylesheets.
I have also written quite complicated stylesheets, but by far nothing as
complicated as the Torque generator, and I have spent lot of time in
debugging simple bugs in these stylesheets. I do not think much would be
gained if the generator was completely rewritten in xsl. But this is just
my personal opinion.

> >That would mean a quite a rewrite of the generator I think. I wonder if
> >that would be very profitable in the light of the commons-sql already
> >to do this...

I do not have an opinion at the moment whether the generator should be
rewritten or not, mainly because I never tried to change anything in the
generator so far. But before one rushes to do it, this should be thought
over very carefully. To rewrite the generator completely takes a lot of
effort, and I am not sure whether the torque developer community has the
manpower to achieve a complete rewriting in reasonable time.
But maybe I just should go ahead and look deeper into the generator as it
is now, to get a better understanding of the problems.


To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org

View raw message