Hi,

----- Original Message -----
From: Diethelm Guallar, Gonzalo <[EMAIL PROTECTED]>


> A couple of basic questions regarding Turbine apps
> and DB access:
>
> * Should I create my own schema in the DB where all
>   the Turbine tables (visitor, roles, etc.) are, or
>   should I create a separate DB for my data?

You can do it both ways.  Just remember that if you use separate DBs you'll need to 
keep
track of separate DatabaseMaps and separate IDBrokers.  Each time you do a query you'll
need to define the Database you're using.

The turbine tables are fairly small and simple so I would suggest you use one Database
just to spare yourself the headache of managing multiple DBs.  Reserve multiple DBs 
only
for *large* apps that warrant the extra complexity.

> * What is the preferred way of accessing data in a
>   DB from a Turbine Java class? Just plain JDBC?
>   Any other tool you guys use? I'm referring to
>   data such as the inventory totals on a shopping
>   cart system... I've heard about Castor and Village,
>   but I'm not sure what's the recommended way of
>   doing this. Any code samples are very welcome!

Turbine has an extendable architecture so you can use your preferred way of database
abstraction - from plain JDBC to high level Castor.  Castor is implemented as a 
service in
org.apache.turbine.services.castor.  I don't know the status of OPL at the moment, but 
you
used to be able to use that as well.

I would really suggest you take a look at Peer.  It is an abstraction that runs on top 
of
Village and I assume that it is probably the most popular way of using Turbine.  Peer 
is
well integrated in Turbine - the security system runs on Peer, etc.  We have a set of
tools ( *OMGenerator in the org.apache.turbine.tools package ) that can create Peer
classes for you.  Usually you just run the utility, compile the classes and off you 
go...
Cool isn't it :-)

AFAIK there is not "Getting started with Peer" documentation anywhere so if you decide 
to
learn it you might want to write everything down as you go along for those who follow 
in
your footsteps.

~ Leon



------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Search: <http://www.mail-archive.com/turbine%40list.working-dogs.com/>
Problems?:           [EMAIL PROTECTED]

Reply via email to