phpgroupware-developers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Phpgroupware-developers] use of PEAR


From: Ralf Becker
Subject: Re: [Phpgroupware-developers] use of PEAR
Date: Sat, 15 Mar 2003 13:41:46 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.0) Gecko/20020529

I had a look for ADOdb http://php.weblogs.com/ADODB

They support transactions, table-locking and tabelcreation.

Here are some links:
- comparison between ADOdb an PEAR::DB http://php.weblogs.com/Compare_PEAR_DB_ADOdb - table-creation and alteration in v. 3.30: http://phplens.com/lens/lensforum/msgs.php?id=5455

With ADOdb we could fully replace our db-classes and most parts of schema-proc (the still needed parts can use ADOdb).

I would recommend the following approach:
1) our db-class gots reimplemented useing ADOdb functions.
2) the api creates a normal db-object and a ADOdb object in $GLOBALS['phpgw']->adodb 3) Apps can still use our old db-classe (which then uses ADOdb) or can use ADOdb direct 4) tables_{baseline|current|update} get a '.type' entry allowing - if set to 'ADOdb' - to use the ADOdb syntax for tablecreation direct. Else the remains of schema_proc will do the conversation. Eg:
  $phpgw_baseline = array(
    'phpgw_test' => array(
      'fd' => array(
'name' => array('type' => 'varchar', 'precision' => 50,'nullable' => False) 'num' => array('type' => 'int', 'precision' => 4, 'default' => 10, 'nullable' => False),
      ),
     'pk' => array('name'),
     'fk' => array(),
     'ix' => array(),
     'uc' => array()
    )
  );
would be:
  $phpgw_baseline = array(
    '.type' => 'ADOdb',
    'phpgw_test' => array(
      array('name','C','50','notnull','key'),
      array('num','N','4','notnull'),
   )
  );

Ralf

Ralf Becker wrote:
I had a look for PEAR::DB and recogniced it allows a lot more, in terms of the construction of querys than our classes. It should be fairly easy to write a wrapper with the same interface as our existing class, to not change all our sources.

But PEAR::DB still misses the following:
- no transactions (they are db-specific)
- no table-locking
- no table-creation and update (*)

(*) this is not part of our db-class nor of PEAR::DB, but of setup and schema proc.

Table-creation and update is a very necessary function for our installation and update-procedures. So just by useing PEAR::DB via a wrapper or direct we would not support any new db's, it only allows us easier porting of other apps useing it and a better way of constructing queries.

Ralf

Lars Kneschke(priv.) wrote:

Hello developers!

Today i had a closer look at PEAR. PEAR has some interessting classes.

Mainly:

http://pear.php.net/manual/en/packages.auth.auth.php
http://pear.php.net/manual/en/core.db.tut_dsn.php

This would take the work of maintaining our classes from our sholders.

The DB Classes also support any DB supported by php. Would be very nice for
us.

The Auth class does also, what our Auth class is doing.

Please, tell me what you think.

Cu
--
Lars Kneschke
http://www.kneschke.de
written with FeLaMiMail





_______________________________________________
Phpgroupware-developers mailing list
address@hidden
http://mail.gnu.org/mailman/listinfo/phpgroupware-developers





--
----------------------------------------------------------------------
Ralf Becker
digital ROCK, Becker & Macht GbR            Telefon +49 (631) 31657-51
Leibnizstraße 17                            Telefax +49 (631) 31657-52
D-67663 Kaiserslautern                 EMail address@hidden





reply via email to

[Prev in Thread] Current Thread [Next in Thread]