[email protected]
[Top] [All Lists]

RE: Simple database access (mysql)

Subject: RE: Simple database access mysql
From: "Shawn Church"
Date: Tue, 8 Mar 2005 22:25:57 -0600
I agree with Kevin in principle, but I would be hesitant to recommend adding
an ORM into the mix at this point unless you are already comfortable with
one of them.  In answer to your question, if you have a singleton connection
manager (i.e. - a connection pool) or even a global connection object, you
can initialize it in various places, but one example would be in
Engine.setupForRequest().  I would not recommend this sort of design in a
production application, but this will work if you are just trying to get
into Tapestry.

There are a number of examples on the web, but one place you might start is
the Tapestry Wiki at http://wiki.apache.org/jakarta-tapestry/.  Check out
the tutorials and the sample applications.


-----Original Message-----
From: Kevin Menard [mailto:[email protected]]
Sent: Tuesday, March 08, 2005 8:06 PM
To: Tapestry users
Subject: Re: Simple database access (mysql)

On 3/8/05 7:28 PM, "Deepak Suldhal" <[email protected]> wrote:

> Hi
>   If someone could please help us with a simple step by step procedure of
> displaying data from
> a database query (for ex MySQL).
>   In Tapestry where do we create the connection class.

At the risk of starting a whole new ORM framework battle, I'd seriously
consider looking at Cayenne or Hibernate or something else.  I know this
isn't a direct answer to your question, but these ORM frameworks make DB
access with Tapestry much nicer.  An ORM framework will provide wrapper
classes for your tables.  Since Tapestry works with properties of objects,
these wrapper classes will make the interaction between Tapestry and your DB
easier (and more intuitive IMHO).


To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

[email protected]----
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

<Prev in Thread] Current Thread [Next in Thread>