Fedor Karpelevitch wrote:
>
> Hi!
>
> I am not too familiar with the way torque works so forgive me if I am
asking
> something stupid.
> My question is:
> Is there any particular reason not to use XSLT to get SQL, DBMap etc. from
> XML instead of templates/java code? That seems to be cleaner.
I looked at it, but I needed something that could do some string
manipulation. Table Names like my_table should become MyTable for java
code.
The other reason is that I wanted to create java code that is easier to edit
and extend. It is more difficult to edit java code that is mingled in xsl
that to edit a .java template.
I'm using the .java templates for everything I do and I found that it is
easy to use. The sql templates still need a bit of work. Primarily because
I still need to build in support for different databases.
At some stage I want to move to Velocity. As soon as Velocity reaches a
point where it is a bit more stable it should be possible to add a new
grammar that are tailor made for code generation. Hopefully this will ease
some of the paint of WM in java and especially sql.
> Another question:
>
> AFAIU, currently Torque is focused on producing file output. I think it
> would be useful to have it actually _do_ the work: I do not want to carry
> all the SQL with my distribution, I would prefer to carry single XML and
> call Torque in the build script to apply the XML directly to the DB. Is
> there anything wrong with it?
Good idea! Unfortunately I won't have time to look into this. Maybe you
can have a look at the code and do something along these lines. This is an
opensource project and newtorque is experimental anyway so feel free to do
some stuff!
> Yet another question:
>
> Currently there is one XML file per DB. Wouldn't it be nice to have one
file
> per table? It would make change tracking more comprehensive and
potentially
> enable abovementioned build scripts to be smarter and update changed
tables
> only.
You previously said you want to carry a single xml file for your
distribution, but now you want to split them up :-) (just joking :-). My
idea was to maybe tell the script which tables to update. I don't know how
yet. Maybe some kind of gui that allows you to use checkboxes to choose
which tables you want updated. Any thoughts on this? Do you feel multiple
files are better?
> Does it make sense?
>
> WBR, Fedor.
>
> PS. I did read docs. I did look at the sourcecode ;-)
Thanks for your comments. I'm always open for constructive criticism.
~ Leon
------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Search: <http://www.mail-archive.com/turbine%40list.working-dogs.com/>
Problems?: [EMAIL PROTECTED]