You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by Jim McNeill <Ji...@BTInternet.COM> on 2001/06/04 22:29:19 UTC

Fools rush in

Having seen the reception that novices get in this list, I get the feeling
that I'm really going to regret this, but here goes.

I honestly have downloaded the TDK and got the example app going, and
amended it a bit OK. It lead me to ask several questions, which I'm having
difficulty answering from the howtos and other docs. I've had a look through
the mail archives too, but I'm still none the wiser.  I'll pose just one of
my questions, so that you can gauge the frightening extent of my ignorance:

Em, Turbine is an application generator, yeah? It creates java code from an
XML representation of database structure, plus some Velocity screen and
layout definitions. You add your business logic into the generated Java
code. So, standard question for code generators, how do I preserve my
business logic when I decide to add a few fields and generate the lot again?

And you thought I was joking when I said I was thick.

Cheers
Jim McNeill


---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org


Re: Fools rush in

Posted by John McNally <jm...@collab.net>.
Torque initially generates 4 OM/Peer classes (as well as a MapBuilder)
from the xml schema.  

BaseFoo  BaseFooPeer
Foo      FooPeer

You should never make any references to BaseFoo or BaseFooPeer.  As the
best way to consider the arrangement as two classes Foo and FooPeer with
the other classes providing a place to safely regenerate code to
add/remove functionality from Foo and FooPeer.  Foo and FooPeer will
only be generated as long as they do not exist, as it is expected that
you will add business logic to these classes.  In order to account for
schema changes BaseFoo and BaseFooPeer are overwritten for any change in
the schema.

John McNally 

Jim McNeill wrote:
> 
> Having seen the reception that novices get in this list, I get the feeling
> that I'm really going to regret this, but here goes.
> 
> I honestly have downloaded the TDK and got the example app going, and
> amended it a bit OK. It lead me to ask several questions, which I'm having
> difficulty answering from the howtos and other docs. I've had a look through
> the mail archives too, but I'm still none the wiser.  I'll pose just one of
> my questions, so that you can gauge the frightening extent of my ignorance:
> 
> Em, Turbine is an application generator, yeah? It creates java code from an
> XML representation of database structure, plus some Velocity screen and
> layout definitions. You add your business logic into the generated Java
> code. So, standard question for code generators, how do I preserve my
> business logic when I decide to add a few fields and generate the lot again?
> 
> And you thought I was joking when I said I was thick.
> 
> Cheers
> Jim McNeill
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: turbine-user-help@jakarta.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org


Re: Fools rush in

Posted by Kurt Schrader <ks...@engin.umich.edu>.
I'm apologize for that last e-mail, it was off-topic and was meant only 
to go to Jason, please ignore it and feel free to reprimand me publicly 
for abusing the list resources.

Kurt

On Tuesday, June 5, 2001, at 03:15 PM, Kurt Schrader wrote:

>
> On Tuesday, June 5, 2001, at 12:58 PM, Jason van Zyl wrote:
>
>> This summer I am writing a book with two others
>> and it will have some sections on Turbine. I hope to make a complete
>> set of Turbine documentation by the end of the summer but others
>> are always welcome. I planned to do this anyway and it just so happened
>> it will land in a book.
>
> You're writing a book on Turbine or Web Based Frameworks or what?  
> You've peaked my interest with your offhand comment.
>
> Kurt
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: turbine-user-help@jakarta.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org


Re: Fools rush in

Posted by Kurt Schrader <ks...@engin.umich.edu>.
On Tuesday, June 5, 2001, at 12:58 PM, Jason van Zyl wrote:

> This summer I am writing a book with two others
> and it will have some sections on Turbine. I hope to make a complete
> set of Turbine documentation by the end of the summer but others
> are always welcome. I planned to do this anyway and it just so happened
> it will land in a book.

You're writing a book on Turbine or Web Based Frameworks or what?  
You've peaked my interest with your offhand comment.

Kurt

---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org


Re: Fools rush in

Posted by Jason van Zyl <jv...@apache.org>.
Jim McNeill wrote:
> 
> Having seen the reception that novices get in this list, I get the feeling
> that I'm really going to regret this, but here goes.

We're not that bad are we? I hope not. There are many helpful
people on this list, we usually answer a lot of questions.

> 
> I honestly have downloaded the TDK and got the example app going, and
> amended it a bit OK. It lead me to ask several questions, which I'm having
> difficulty answering from the howtos and other docs. I've had a look through
> the mail archives too, but I'm still none the wiser.  I'll pose just one of
> my questions, so that you can gauge the frightening extent of my ignorance:
> 
> Em, Turbine is an application generator, yeah?

Turbine uses Torque to generate your SQL and object model, but Turbine
itself is not an application generator. But the TDK does generate
a sample application. Turbine is the framework itself while the TDK
is a collection of all the tools you need to develop with the framework.

> It creates java code from an
> XML representation of database structure, plus some Velocity screen and
> layout definitions. You add your business logic into the generated Java
> code. So, standard question for code generators, how do I preserve my
> business logic when I decide to add a few fields and generate the lot again?

When the object model is generated there are base classes which contain
almost all of the logic initially, but you will also notice generated
subclasses which are empty and it is in these generated subclasses that
you add you domain specific logic.
 
> And you thought I was joking when I said I was thick.

There is a lot in Turbine and it's definitely hard to wrap your
head around it all. This summer I am writing a book with two others
and it will have some sections on Turbine. I hope to make a complete
set of Turbine documentation by the end of the summer but others
are always welcome. I planned to do this anyway and it just so happened
it will land in a book.

> Cheers
> Jim McNeill
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: turbine-user-help@jakarta.apache.org

-- 
jvz.

Jason van Zyl
jvanzyl@apache.org

http://jakarta.apache.org/velocity
http://jakarta.apache.org/turbine
http://jakarta.apache.org/commons
http://tambora.zenplex.org

---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org


Re: DB changes, what to do? (Was Re: Fools rush in)

Posted by Jon Stevens <jo...@latchkey.com>.
on 6/6/01 1:30 PM, "Bruno Unna" <br...@iac.com.mx> wrote:

> But doesn't that imply I have to give up the benefits of using torque?

Not at all. You still continue to use Torque.

> I
> would love to make the structural DB changes in the
> <project-base>/WEB-INF/build/project/<project-name>-schema.xml file.

Yes, that is what you do.

The alter table statements are for people who will be upgrading from
previous versions of your schema.

-jon

-- 
"Open source is not available to commercial companies."
            -Steve Balmer, CEO Microsoft
<http://www.suntimes.com/output/tech/cst-fin-micro01.html>


---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org


Re: DB changes, what to do? (Was Re: Fools rush in)

Posted by Bruno Unna <br...@iac.com.mx>.
On 06 Jun 2001 12:37:27 -0700, Jon Stevens wrote:
> on 6/5/01 4:49 PM, "Bruno Unna" <br...@iac.com.mx> wrote:
> 
> > Is there a recommended procedure to make DB structural changes to an
> > application once it has been generated, or even once the database has
> > been populated? A sort or backup/restore procedure (I know that for
> > severe changes to the DB structure it is nonsense, but for slight or
> > gradual ones, it is not).
> 
> Create a file with alter table statements in it.

But doesn't that imply I have to give up the benefits of using torque? I
would love to make the structural DB changes in the
<project-base>/WEB-INF/build/project/<project-name>-schema.xml file.

And if it is not directly possible, what would be the best way to
implement it? I've been thinking of adding a couple of targets to the
build.xml ant file, one for saving and one for (perhaps just trying) to
restoring the information.

In an ideal world, the DB design would be ready and definitive before
the actual coding of the business rules. Problem is: this is not an
ideal world, so the very skeleton of the data to be used by an
application is due to changes in advanced stages of development...

--
"Create like a god,                Bruno Unna <br...@iac.com.mx>
 command like a king,                   Internet de Alta Calidad
 and work like a slave."              Red Hat Certified Engineer
             Kawasaki                   PGP public key available


---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org


Re: DB changes, what to do? (Was Re: Fools rush in)

Posted by Jon Stevens <jo...@latchkey.com>.
on 6/5/01 4:49 PM, "Bruno Unna" <br...@iac.com.mx> wrote:

> Is there a recommended procedure to make DB structural changes to an
> application once it has been generated, or even once the database has
> been populated? A sort or backup/restore procedure (I know that for
> severe changes to the DB structure it is nonsense, but for slight or
> gradual ones, it is not).

Create a file with alter table statements in it.

-jon

-- 
"Open source is not available to commercial companies."
            -Steve Balmer, CEO Microsoft
<http://www.suntimes.com/output/tech/cst-fin-micro01.html>


---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org


DB changes, what to do? (Was Re: Fools rush in)

Posted by Bruno Unna <br...@iac.com.mx>.
On 05 Jun 2001 11:40:20 -0700, Jon Stevens wrote:
> 
> Not foolish at all.
> 
> On Mon, 4 Jun 2001, Jim McNeill wrote:
> 

[cropped]

> 
> > You add your business logic into the generated Java
> > code. So, standard question for code generators, how do I preserve my
> > business logic when I decide to add a few fields and generate the lot again?
> 
> From the Torque side of things, it will generate base classes where the
> generated code is as well as *the first time it is run*, it will generate
> empty classes that extend those base classes. Since they are only
> generated the first time, they do not get overwritten.
> 

Is there a recommended procedure to make DB structural changes to an
application once it has been generated, or even once the database has
been populated? A sort or backup/restore procedure (I know that for
severe changes to the DB structure it is nonsense, but for slight or
gradual ones, it is not).

--
"Create like a god,                Bruno Unna <br...@iac.com.mx>
 command like a king,                   Internet de Alta Calidad
 and work like a slave."              Red Hat Certified Engineer
             Kawasaki                   PGP public key available


---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org


helpme!

Posted by Toni Karhu <to...@remoteapps.com>.
Hello, im trying to use peers within JSP:s I've gone
thru the steps in the jsp howto and as it says I have
copied the jsp pages to the /templates folder. When I
start catalina and try to access that page I get a
login popupscreen, its asking for a password but its
not the one that you use to logon to turbine
datamanagement(turbine,turbine). 

I I disable the loging service from web.xml i get an
error that the logging service is required. For peer
use. Can you not use the peer service without login?
(how do you disable it)

So my question is what or where is this password 
defined? 

thanks,

Toni
Hello, im trying to use peers within JSP:s I've gone
thru the steps in the jsp howto and as it says I have
copied the jsp pages to the /templates folder. When I
start catalina and try to access that page I get a
login popupscreen, its asking for a password but its
not the one that you use to logon to turbine
datamanagement(turbine,turbine). 

I I disable the loging service from web.xml i get an
error that the logging service is required. For peer
use. Can you not use the peer service without login?
(how do you disable it)

So my question is what or where is this password 
defined? 

thanks in advance




---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org


1.1 confusion at step one ;)

Posted by Gary Lawrence Murphy <ga...@canada.com>.
No need for alarm: Just a minor usability issue where the the new
TDK-howto (in 2.1) says nothing about the tdk/build.properties

        tdk.home = .
        app.root = share/sample
        share.dir = share

The first I can guess, but the other two are more obscure.  build.xml
appears to use them only as a means to grab the common files and
templates used to _generate_ the app, thus "app.root" may not be as
apropos as "tdk.template" as the general process is to do a copy from
app.root.* to app.* (ie, make copies of the template "sample" app files.

-- 
Gary Lawrence Murphy <ga...@teledyn.com> TeleDynamics Communications Inc
Business Innovations Through Open Source Systems: http://www.teledyn.com
"Computers are useless.  They can only give you answers."(Pablo Picasso)


---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org


Re: Fools rush in

Posted by Gary Lawrence Murphy <ga...@canada.com>.
>>>>> "J" == Jon Stevens <jo...@latchkey.com> writes:

    J> Actually, I would rather shy away from Wiki. It tends to get
    J> cluttered really quickly and doesn't work that well for
    J> documentation. Just ask the Webmacro project. :-)

Anecdotal evidence is not evidence of a pattern ;) 

FWIW, I've used Wikis for several projects, some float, others
flounder.  If I have seen any pattern at all, it's that collaborative
writing works best when access is open and the tools allow easy, rapid
changes.

The biggest advantage to a wiki is shown by your instructions ...

    J> There is no reason why people can't contribute documentation 
    J> by simply downloading Turbine 
    J> from CVS 
    J> and modifying
    J> or creating files
    J> in the xdocs directory. 
    J> Just send us patches and new files 
    J> and they will get checked in.

This is all very clear and fair to people who may be paid to
participate, and I expect a lot of us do this sort of thing in our
day-to-day job so it's not that we don't know _how_.  It just seems to
assume a great deal more commitment than I'd expect to see, especially
from people who may (rightly or wrongly) believe they don't know what
they are doing.  It begs for caution and care. It doesn't encourage
mistakes ;)

I don't know about you, but I get 1000 times more small email comments
about my code than actual context diffs, probably because a comment,
if it is wrong, is easily forgotten, but a diff takes time and care,
and it hurts a little when they don't take your patch.

One advantage of a web-page community document like Wiki or Jyve is
that people can add little bits of fuzzy knowledge knowing that
someone else can quickly correct it; it reduces the embarrassment
factor.

Another advantage is the low investment of energy.  A lot of the
initial kernelwiki was pieced together by browsing the kernel mailing
list for clear Q:A sections and using cut and paste to publish it.

That said, it's not an urgent thing, and yes, given the choice, I
would much rather have documentation that travels with the project in
with the xdocs.

-- 
Gary Lawrence Murphy <ga...@teledyn.com> TeleDynamics Communications Inc
Business Innovations Through Open Source Systems: http://www.teledyn.com
"Computers are useless.  They can only give you answers."(Pablo Picasso)


---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org


Re: Fools rush in

Posted by Jon Stevens <jo...@latchkey.com>.
on 6/6/01 1:28 PM, "Gary Lawrence Murphy" <ga...@canada.com> wrote:

> Speaking of which ... I have Wiki software running on my site just
> itching for an application, but have very little time to maintain
> it.  Would it be an advantage to have me turn this into the said
> Dummies guide?

Actually, I would rather shy away from Wiki. It tends to get cluttered
really quickly and doesn't work that well for documentation. Just ask the
Webmacro project. :-)

There is no reason why people can't contribute documentation by simply
downloading Turbine from CVS and modifying/creating files in the xdocs
directory. Just send us patches and new files and they will get checked in.

-jon


---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org


Re: Fools rush in

Posted by Gary Lawrence Murphy <ga...@canada.com>.
>>>>> "J" == Jim McNeill <Ji...@BTInternet.COM> writes:

    J> Turbine for Dummies anyone?

I'll take two -- both of them are for me ;)

Speaking of which ... I have Wiki software running on my site just
itching for an application, but have very little time to maintain
it.  Would it be an advantage to have me turn this into the said
Dummies guide?

-- 
Gary Lawrence Murphy <ga...@teledyn.com> TeleDynamics Communications Inc
Business Innovations Through Open Source Systems: http://www.teledyn.com
"Computers are useless.  They can only give you answers."(Pablo Picasso)


---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org


Re: Fools rush in

Posted by Jon Stevens <jo...@latchkey.com>.
on 6/6/01 12:05 PM, "Jim McNeill" <Ji...@BTInternet.COM> wrote:

> Thanks to all for the many replies on this. I now have some decent pointers
> to attack the howtos.
> 
> Reading the overview again I see that Turbine is squarely aimed at
> "experienced Java programmers", rather than those like myself who have only
> recently picked up a cheapo copy of Sybex's "Java 2 Complete" and downloaded
> NetBeans. What the hey - I'm smitten, and Turbine is the path I'm taking.
> But I'll try not to waste anyone's time further with dumb questions.
> 
> Turbine for Dummies anyone?
> 
> Cheers
> Jim McNeill

The idea behind Turbine is that someone with enough Java experience can get
things setup and build an application that anyone can customize the UI/IA
of.

Building high end web applications is not for the faint of heart.

Tools like WebObjects and other GUI builder app servers try to get you there
and they do a good job for the most part, but they tend to fall apart when
you need to do something that is "outside of the box" because they require
you to learn quite a bit about them as well as software development. In
other words, you are back at square one, except that you paid a bazillion $
for them. :-)

I tend to shy away from drag and drop easy systems because I have been
burned before by them.

-jon

-- 
"Open source is not available to commercial companies."
            -Steve Balmer, CEO Microsoft
<http://www.suntimes.com/output/tech/cst-fin-micro01.html>


---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org


RE: Fools rush in

Posted by Jim McNeill <Ji...@BTInternet.COM>.
Thanks to all for the many replies on this. I now have some decent pointers
to attack the howtos.

Reading the overview again I see that Turbine is squarely aimed at
"experienced Java programmers", rather than those like myself who have only
recently picked up a cheapo copy of Sybex's "Java 2 Complete" and downloaded
NetBeans. What the hey - I'm smitten, and Turbine is the path I'm taking.
But I'll try not to waste anyone's time further with dumb questions.

Turbine for Dummies anyone?

Cheers
Jim McNeill


---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org


Re: Fools rush in

Posted by Jon Stevens <jo...@latchkey.com>.
Not foolish at all.

On Mon, 4 Jun 2001, Jim McNeill wrote:

> Em, Turbine is an application generator, yeah?

Turbine is a web app framework.

> It creates java code from an
> XML representation of database structure

Yes, Torque is what is used to generate the Peer code. This is the OR tool
that we use. It is optional to use, but recommended if you are going to be
connecting to a database.

>, plus some Velocity screen and
> layout definitions.

For the most part, it does not generate this (yet). You need to create
that yourself. That is the process of building the UI portion of the
application and that is your job. :-)

> You add your business logic into the generated Java
> code. So, standard question for code generators, how do I preserve my
> business logic when I decide to add a few fields and generate the lot again?

>From the Torque side of things, it will generate base classes where the
generated code is as well as *the first time it is run*, it will generate
empty classes that extend those base classes. Since they are only
generated the first time, they do not get overwritten.

-jon


---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org


RE: Fools rush in

Posted by Sean Leach <sl...@netlojix.com>.
In the one of the docs it says to subclass your generated Peer class, and
add your logic there.

http://jakarta.apache.org/turbine/howto/peers-howto.html I think.

Sean

-----------------------------------------------------
Sean Leach
Director of Technology | eBusiness Services
NetLojix Communications, Inc.           NASDAQ:  NETX
e - sleach@netlojix.com
v - 805.884.6375
f - 805.883.5627
w - www.netlojix.com


-----Original Message-----
From: turbine-user-return-2284-sleach=netlojix.com@jakarta.apache.org
[mailto:turbine-user-return-2284-sleach=netlojix.com@jakarta.apache.org]
On Behalf Of Jim McNeill
Sent: Monday, June 04, 2001 1:29 PM
To: turbine-user@jakarta.apache.org
Subject: Fools rush in


Having seen the reception that novices get in this list, I get the feeling
that I'm really going to regret this, but here goes.

I honestly have downloaded the TDK and got the example app going, and
amended it a bit OK. It lead me to ask several questions, which I'm having
difficulty answering from the howtos and other docs. I've had a look through
the mail archives too, but I'm still none the wiser.  I'll pose just one of
my questions, so that you can gauge the frightening extent of my ignorance:

Em, Turbine is an application generator, yeah? It creates java code from an
XML representation of database structure, plus some Velocity screen and
layout definitions. You add your business logic into the generated Java
code. So, standard question for code generators, how do I preserve my
business logic when I decide to add a few fields and generate the lot again?

And you thought I was joking when I said I was thick.

Cheers
Jim McNeill


---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org