You are viewing a plain text version of this content. The canonical link for it is here.
Posted to torque-dev@db.apache.org by Thomas Fischer <fi...@seitenbau.net> on 2010/05/14 17:20:55 UTC
refactoring names in generator
In the tiscussion about accepting the current generator codebase, it was
suggested that the project name remains "generator". However, in the
current codebase, the project name is "torque-gf" (gf for generation
framework). Also, "Generator" is the name of an interface for a java class
producing thext output.
So to prevent further overloading of the term "generator", the name of this
interface should be changed to something else
I intend to pull this straight this weekend, with the following
replacements
"Generator" (interface name of output-producing class and config xml
element name) -> Outlet
"$torqueGf" (velocity variable name) -> "$torqueGen"
gf (package name) -> "generator"
Any objections ? Any better ideas for the class name "Outlet" ?
Thomas
---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org
RE: refactoring names in generator
Posted by Thomas Fischer <fi...@seitenbau.net>.
> FYI - When I was talking about the "Generator" component for Torque,
> I was thinking that the Generator component was the holder for the
> Torque specific "build" tool "interface" code.
>
> I was assuming that the "Output" generator framework would eventually
> be in a separate sub project since you have expressed that it could
> become a standalone external.
>
> I.e., having the same structure 3.x does with Texan/Velocity... but
> with the Output code jar replacing them.
The current structure is as follows:
- The generator project contains a general text/code generation tool. It is
build-system agnostic. It does not contain any information about the torque
schema file structure.
- The templates project contain all knowlewdge about the torque schema file
structure, and how the output (java, sql, html) is created from the schema
files.
- The maven2 plugin embeds the generator into the maven 2 build system
In the future I see the following structural changes:
- an ant plugin (not yet implemented, extra subproject) will expose the
generator as an ant task.
- currently the generator is missing the jdbc2xml (create schema file from
jdbc metadata) and sql2xml (create schema data from sql script) tasks from
the old generator. I plan to incorporate the jdbc2xml task by writing a
jdbc metadata source for reading data from jdbc metadata which then can
feed the generator.
Does anybody know of anyone using the sql2xml task ? Anybody sees the need
to support it in Torque 4 ?
Thomas
---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org
RE: refactoring names in generator
Posted by Greg Monroe <Gr...@dukece.com>.
Given all the weekend hours TF's been putting it... maybe:
Exhaustion...
Thanks Thomas F. for doing all this!
FYI - When I was talking about the "Generator" component for Torque,
I was thinking that the Generator component was the holder for the
Torque specific "build" tool "interface" code.
I was assuming that the "Output" generator framework would eventually
be in a separate sub project since you have expressed that it could
become a standalone external.
I.e., having the same structure 3.x does with Texan/Velocity... but
with the Output code jar replacing them.
Just some longer term structural setup thoughts.
> -----Original Message-----
> From: Thomas Vandahl [mailto:tv@apache.org]
> Sent: Monday, May 17, 2010 1:28 PM
> To: Apache Torque Developers List
> Subject: Re: refactoring names in generator
>
> On 14.05.10 17:20, Thomas Fischer wrote:
> > Any objections ? Any better ideas for the class name "Outlet" ?
> What about "Exhaust"? :-P
>
> Bye, Thomas
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
> For additional commands, e-mail: torque-dev-help@db.apache.org
DukeCE Privacy Statement:
Please be advised that this e-mail and any files transmitted with
it are confidential communication or may otherwise be privileged or
confidential and are intended solely for the individual or entity
to whom they are addressed. If you are not the intended recipient
you may not rely on the contents of this email or any attachments,
and we ask that you please not read, copy or retransmit this
communication, but reply to the sender and destroy the email, its
contents, and all copies thereof immediately. Any unauthorized
dissemination, distribution or copying of this communication is
strictly prohibited.
---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org
Re: refactoring names in generator
Posted by Thomas Vandahl <tv...@apache.org>.
On 14.05.10 17:20, Thomas Fischer wrote:
> Any objections ? Any better ideas for the class name "Outlet" ?
What about "Exhaust"? :-P
Bye, Thomas
---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org
RE: refactoring names in generator
Posted by Thomas Fischer <fi...@seitenbau.net>.
> Don't have a strong opinion... just a take it or leave it thought
> that since gf is sort of a Template engine that something like
> Transformer might be slightly more appropriate.
Hm a ??? is not just a template wrapper. It could also be a java class or a
xslt stylesheet or just anything which produces text output. So yes,
Transfomer would also be a good name. But, the name Transformer is already
used in the generator; there is an interface called SourceTransformer which
takes the input and transforms it before the ??? instances are applied.
> Or we could go
> with the power analogy and use something like Motor (which produces
> Torque...)
I'd rather have a name which describes what the class does.
> FWIW, I'm thinking we'd still have a Generator project to contain
> all the "build" tools in addition to code generation. E.g., stuff
> to support the Ant/Maven tasks like jdbc->xml and xml->sql, and
> the like.
xml->sql is also just "code generation", but sql code instead of java code.
For jdbc->xml, I'd rather create a separate subproject. But of course, this
is open to discussion.
> +0.5 Outlet || Transformer
> +0.1 Motor
So overall, I'd stick with "Outlet" if no new suggestions come up.
Thomas
---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org
RE: refactoring names in generator
Posted by Greg Monroe <Gr...@dukece.com>.
Hmm... sort of a nice reverse logic flow here E.g. in the real world,
Torque is required to turn the Generator which sends power to Outlets.
In our case, the Generator sends stuff to the Outlet to produce
Torque. Kind of symmetrical, in an odd way.
Don't have a strong opinion... just a take it or leave it thought
that since gf is sort of a Template engine that something like
Transformer might be slightly more appropriate. Or we could go
with the power analogy and use something like Motor (which produces
Torque...)
FWIW, I'm thinking we'd still have a Generator project to contain
all the "build" tools in addition to code generation. E.g., stuff
to support the Ant/Maven tasks like jdbc->xml and xml->sql, and
the like.
Anyway, I'd say:
+0.5 Outlet || Transformer
+0.1 Motor
> -----Original Message-----
> From: Thomas Fischer [mailto:fischer@seitenbau.net]
> Sent: Friday, May 14, 2010 11:21 AM
> To: Apache Torque Developers List
> Subject: refactoring names in generator
>
>
> In the tiscussion about accepting the current generator codebase, it was
> suggested that the project name remains "generator". However, in the
> current codebase, the project name is "torque-gf" (gf for generation
> framework). Also, "Generator" is the name of an interface for a java
> class
> producing thext output.
> So to prevent further overloading of the term "generator", the name of
> this
> interface should be changed to something else
>
> I intend to pull this straight this weekend, with the following
> replacements
>
> "Generator" (interface name of output-producing class and config xml
> element name) -> Outlet
> "$torqueGf" (velocity variable name) -> "$torqueGen"
> gf (package name) -> "generator"
>
> Any objections ? Any better ideas for the class name "Outlet" ?
>
> Thomas
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
> For additional commands, e-mail: torque-dev-help@db.apache.org
DukeCE Privacy Statement:
Please be advised that this e-mail and any files transmitted with
it are confidential communication or may otherwise be privileged or
confidential and are intended solely for the individual or entity
to whom they are addressed. If you are not the intended recipient
you may not rely on the contents of this email or any attachments,
and we ask that you please not read, copy or retransmit this
communication, but reply to the sender and destroy the email, its
contents, and all copies thereof immediately. Any unauthorized
dissemination, distribution or copying of this communication is
strictly prohibited.
---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org