[UPHPU] dybase (was: OOP continued)

Lonnie Olson fungus at aros.net
Thu Jun 30 10:12:38 MDT 2005


On Jun 29, 2005, at 11:58 AM, Jeffrey Moss wrote:
> Here's a good example from my O/R presentation, the "dybase" object  
> oriented database system. You probably use databases in 95% of your  
> applications. You just can't get this level of organization (or  
> power for that matter) without classes:
>
> include "dybase.php";
>
> class Person extends Persistent {
>    public $name;
>    public $height;
>    public $weight;
>
>    public function __construct($name, $height, $weight) {
>        $this->name = $name;
>        $this->height = $height;
>        $this->weight = $weight;
>    }
> }
>
> class Root extends Persistent {
>    public $people;
> }
>
> $db = new Storage();
> if ($db->open("test.dbs")) {
> $root = $db->getRootObject();
>    if ($root == null) {
>        $root = new Root();
>        $root->people = $db->createStrIndex();
>        $db->setRootObject($root);
>    }
>    $jeff = new Person('Jeff Moss', 75, 200);
>    $root->people->insert($jeff->name, $jeff);
> }


Wow, dybase looks really cool.  Looks like it is a great way to  
persist objects across application accesses.  I can't wait to try it  
out.  Thanks.

--lonnie

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2482 bytes
Desc: not available
Url : http://uphpu.org/pipermail/uphpu/attachments/20050630/92b5e3f4/smime.bin


More information about the UPHPU mailing list