I never said they were the same. I said that crossdb is a few generations
behind Torque in design and thinking.

Torque's code generation is the way to go in terms of OR tools. Anything
else, IMHO, is backwards.

You also left out all the code related to getting the 'conn' object. Torque
abstracts all that away so it isn't necessary at all.

Another problem with crossdb design is that you are defining all of the
database logic within the code instead of abstracting it elsewhere. It is
like coding HTML in ECS. What happens when you want to change the emp_id
column definition? You are also hard coding a lot of strings in your code.
What happens when you want to rename a column? At least with Torque it is
static generated strings.

What you should ask yourself is:

    What is the benefit of using crossdb over Torque?

-jon


on 4/21/02 10:59 PM, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
wrote:

> Actually Jon,
> 
> Torque and crossdb are quite a bit different.  Torque is pre generated and
> requires some preliminary setup and doesn't deal with SQL statements directly.
> Whereas crossdb is on the fly and is an object oriented way of creating SQL
> statements that are database independent.
> 
> Torque row insert example after generation (taken from tutorial):
> 
> Publisher addison = new Publisher();
> addison.setName("Addison Wesley Professional");
> addison.save();
> 
> Author bloch = new Author();
> bloch.setFirstName("Joshua");
> bloch.setLastName("Bloch");
> bloch.save();
> 
> crossdb row insert example:
> 
> InsertQuery iq = factory.getInsertQuery();
> iq.setTable("Employees");
> iq.addAutoIncrementColumn("emp_id");
> iq.addColumn("emp_name", "Travis Reeder");
> iq.addColumn("emp_department", "Development");
> iq.execute(conn);
> 
> Quite a bit different don't you think?
> 
> Tim: I did read that page and thought I covered the more important points. Is
> there a formal way of doing these proposals?
> 
> Travis

-- 
Nixon: "At least with liquor, I don't lose motivation."



--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to