cvs: pres / slideshow.txt /slides/pear about.php currentpkg.php oscon2001.php standards1.php standards2.php tools.php tut1.php tut2.php tut4.php
whystd.php xml1.php xml2.php
| From: | Jon Parise | Date: | Thu, 26 Jul 2001 05:11:44 +0000 |
| Subject: | cvs: pres / slideshow.txt /slides/pear about.php currentpkg.php oscon2001.php standards1.php standards2.php tools.php tut1.php tut2.php tut4.php whystd.php xml1.php xml2.php |
||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-346@lists.php.net to get a copy of this message | ||
jon Thu Jul 26 01:11:44 2001 EDT
Added files:
/pres/slides/pear oscon2001.php tools.php xml1.php xml2.php
Modified files:
/pres slideshow.txt
/pres/slides/pear about.php currentpkg.php standards1.php
standards2.php tut1.php tut2.php tut4.php
whystd.php
Log:
O'Reilly Open Source Convention 2001 PEAR presentation
Index: pres/slideshow.txt diff -u pres/slideshow.txt:1.111 pres/slideshow.txt:1.112 --- pres/slideshow.txt:1.111 Mon Jul 23 20:37:30 2001 +++ pres/slideshow.txt Thu Jul 26 01:11:44 2001 @@ -1931,6 +1931,27 @@ ext4.php: Extension Structure opt.php: Optimization +START:pear2:slides/pear:7/26/2001 San Diego - OSCON - The PHP Extension and Application Repository +oscon2001.php: PEAR +agenda.php: Agenda +motivation.php: Motivation +about.php: What is it? +packages.php: Packages +standards1.php: Standards (1) +standards2.php: Standards (2) +whystd.php: Why All These Standards? +currentpkg.php: Currently Provided Functionality +challenges.php: Current Challenges +tut1.php: Making Your Own Class +tut2.php: DB connect/basics +tut3.php: DB prepare/execute +tut4.php: Error Handling +xml1.php: XML Packaging Format (PHP) +xml2.php: XML Packaging Format (C) +tools.php: PEAR Tools +todo.php: Plans Ahead +joinus.php: How to contribute? +questions.php: Questions Anyone? #------------------------------------------------------------- # Default Setting for all presentations. These can be Index: pres/slides/pear/about.php diff -u pres/slides/pear/about.php:1.1 pres/slides/pear/about.php:1.2 --- pres/slides/pear/about.php:1.1 Thu Apr 5 11:33:42 2001 +++ pres/slides/pear/about.php Thu Jul 26 01:11:44 2001 @@ -8,8 +8,8 @@ bullet("Distribution infrastructure"); bullet("Development community"); bullet("Lots of reusable code!"); -bullet("Not aiming to be Yet Another Web Publishing System, but ". - "a toolkit for such"); +bullet('Not aiming to be "Yet Another Web Publishing System", but ' . + 'a toolkit for such'); endbulletlist(); footer(); Index: pres/slides/pear/currentpkg.php diff -u pres/slides/pear/currentpkg.php:1.1 pres/slides/pear/currentpkg.php:1.2 --- pres/slides/pear/currentpkg.php:1.1 Thu Apr 5 11:33:42 2001 +++ pres/slides/pear/currentpkg.php Thu Jul 26 01:11:44 2001 @@ -3,7 +3,7 @@ require 'slide.inc'; bulletlist(); -bullet("Common error-reporting system"); +bullet("Common error-reporting system (PEAR_Error)"); bullet("Emulated destructors"); bullet("Benchmarking"); bullet("Function call/output caching"); Index: pres/slides/pear/standards1.php diff -u pres/slides/pear/standards1.php:1.3 pres/slides/pear/standards1.php:1.4 --- pres/slides/pear/standards1.php:1.3 Tue May 22 17:52:52 2001 +++ pres/slides/pear/standards1.php Thu Jul 26 01:11:44 2001 @@ -3,7 +3,8 @@ require 'slide.inc'; bulletlist(); -bullet("http://php.net/manual/en/pear.standards.php"); +bullet('<a href="http://php.net/manual/en/pear.standards.php">' . + 'http://php.net/manual/en/pear.standards.php</a>'); bullet("Reference docs in comments"); bullet("Always use <?php ?>"); bullet("File, class, variable and function names"); Index: pres/slides/pear/standards2.php diff -u pres/slides/pear/standards2.php:1.1 pres/slides/pear/standards2.php:1.2 --- pres/slides/pear/standards2.php:1.1 Thu Apr 5 11:33:42 2001 +++ pres/slides/pear/standards2.php Thu Jul 26 01:11:44 2001 @@ -9,6 +9,7 @@ bullet("Function name: Foo_Bar_testfunc"); bullet("Constant name: FOO_BAR_CONSTANT"); bullet("Global name: \$_FOO_BAR_global_variable"); +bullet("Private name: \$_variable, _functionName()"); endbulletlist(); footer(); Index: pres/slides/pear/tut1.php diff -u pres/slides/pear/tut1.php:1.1 pres/slides/pear/tut1.php:1.2 --- pres/slides/pear/tut1.php:1.1 Thu Apr 5 11:33:42 2001 +++ pres/slides/pear/tut1.php Thu Jul 26 01:11:44 2001 @@ -2,35 +2,40 @@ require 'slide.inc'; -print "<BR><BR>\n"; -print "<H2>My/Class.php:</H2>\n"; example('<?php - require_once "PEAR.php"; /** - * @author Joe Schmoe <joe@schmoe.com> + * @author Joe Schmoe <joe@schmoe.com> */ class My_Class extends PEAR { - var $str; /** - * Documentation goes here. - * @param string, a string parameter + * Private class variable. + * @var $_str + */ + var $_str; + + /** + * Constructor documentation goes here. + * + * @param string $str A nifty string parameter. */ - function My_Class($str) { - // this is the constructor + function My_Class($str) + { $this->PEAR(); - $this->str = $str; + $this->_str = $str; } - function _My_Class() { - // this is the destructor + /** + * Destructor + */ + function _My_Class() + { $this->_PEAR(); } } - -e?>'); +?>'); footer(); Index: pres/slides/pear/tut2.php diff -u pres/slides/pear/tut2.php:1.1 pres/slides/pear/tut2.php:1.2 --- pres/slides/pear/tut2.php:1.1 Thu Apr 5 11:33:42 2001 +++ pres/slides/pear/tut2.php Thu Jul 26 01:11:44 2001 @@ -2,8 +2,9 @@ require 'slide.inc'; +echo '<br>'; +echo '<h3> Connecting to the database:</h3>'; example('<?php - require_once "DB.php"; $dbh = DB::connect("pgsql://user:password@localhost/mydb"); @@ -13,17 +14,22 @@ exit; } $dbh->setErrorHandling(PEAR_ERROR_DIE); +?>'); + +echo '<h3> Executing queries:</h3>'; +example('<?php $sth = $dbh->query("SELECT totem, pole FROM mytable"); while ($res = $sth->fetchInto($row)) { print "$row[0] : $row[1]<BR>\n"; } -// or this: +?>'); + +echo '<br>'; +example('<?php $sth = $dbh->query("SELECT totem, pole FROM mytable"); while ($res = $sth->fetchInto($row, DB_FETCHMODE_ASSOC)) { print "$row[totem] : $row[pole]<BR>\n"; } -// also try $dbh->setFetchMode(PEAR_ERROR_ASSOC); - ?>'); footer(); Index: pres/slides/pear/tut4.php diff -u pres/slides/pear/tut4.php:1.1 pres/slides/pear/tut4.php:1.2 --- pres/slides/pear/tut4.php:1.1 Tue Apr 10 18:24:20 2001 +++ pres/slides/pear/tut4.php Thu Jul 26 01:11:44 2001 @@ -2,14 +2,16 @@ require 'slide.inc'; +echo '<br>'; +echo '<h3> Setting the default error handler:</h3>'; example('<?php - -// ways of setting the default error handler: $obj->setErrorHandling(PEAR_ERROR_DIE); $obj->setErrorHandling(PEAR_ERROR_CALLBACK, "error_handler"); $obj->setErrorHandling(PEAR_ERROR_CALLBACK, array($obj, "errorHandler")); +?>'); -// returning an error: +echo '<h3> Returning an error:</h3>'; +example('<?php class Foo extends PEAR { function blah() @@ -17,14 +19,15 @@ return $this->raiseError("syntax error", -42); } } +?>'); -// detecting an error: +echo '<h3> Detecting an error:</h3>'; +example('<?php $connection = Net_Socket::connect(...); if (PEAR::isError($connection)) { - print "Ooops: " . $connection->getMessage() . "<BR>\n"; + print "Oops: " . $connection->getMessage() . "<br>\n"; exit; } - ?>'); footer(); Index: pres/slides/pear/whystd.php diff -u pres/slides/pear/whystd.php:1.1 pres/slides/pear/whystd.php:1.2 --- pres/slides/pear/whystd.php:1.1 Thu Apr 5 11:33:42 2001 +++ pres/slides/pear/whystd.php Thu Jul 26 01:11:44 2001 @@ -3,7 +3,7 @@ require 'slide.inc'; bulletlist(); -bullet("Rapid collaboration: Make hacking eachothers' code easier"); +bullet("Rapid collaboration: Make hacking each others' code easier"); bullet("Consistency: Users know what to expect and look for"); bullet("Automation: Programs know what to expect and look for :-)"); endbulletlist(); Index: pres/slides/pear/oscon2001.php +++ pres/slides/pear/oscon2001.php <?require 'slide.inc'?> <br><br><br><br><br><br><h1 align=center>The PHP Extension and Application Repository</h1> <br><h3 align=center>San Diego, July 26, 2001</h3> <br><h2 align=center>Jon Parise <jon@php.net></h2> <br><h3 align=center><a href="http://conf.php.net/pear">http://conf.php.net/pear</a></h2> <?footer()?> Index: pres/slides/pear/tools.php +++ pres/slides/pear/tools.php <?php require 'slide.inc'; echo '<br>'; echo '<h3> pear commandline tool:</h3>'; example('# pear install Log.tgz # pear install http://www.example.com/pear/Log.tgz # pear package package.xml'); echo '<h3> pearize - generates Makefile.in from package.xml</h3>'; echo '<h3> phpize - generates configure script</h3>'; footer(); ?> Index: pres/slides/pear/xml1.php +++ pres/slides/pear/xml1.php <?php require 'slide.inc'; example('<?xml version="1.0" encoding="ISO-8859-1" ?> <Package> <Name>Log</Name> <Summary>Logging utilities</Summary> <Maintainer> <Initials>JCP</Initials> <Name>Jon Parise</Name> <Email>jon@php.net</Email> </Maintainer> <Release> <Version>1.0</Version> <Date>2001-05-15</Date> <Notes> This is the initial independent release of the Log package. </Notes> </Release> <FileList> <Dir>/</Dir> <File>Log.php</File> <Dir>Log</Dir> <File>composite.php</File> <File>file.php</File> <File>mcal.php</File> <File>observer.php</File> <File>sql.php</File> <File>syslog.php</File> </FileList> </Package>'); footer(); ?> Index: pres/slides/pear/xml2.php +++ pres/slides/pear/xml2.php <?php require 'slide.inc'; example('<?xml version="1.0" encoding="ISO-8859-1" ?> <Package> <Name>PEAR</Name> <Summary>PEAR base classes</Summary> <Maintainer> <Initials>SSB</Initials> <Name>Stig Sæther Bakken</Name> <Email>ssb@fast.no</Email> </Maintainer> <FileList> <File Role="php">PEAR.php</File> <LibFile> <LibName>PEAR</LibName> <Sources>pear.c</Sources> </LibFile> </FileList> </Package>'); footer(); ?>
Index: pres/slideshow.txt diff -u pres/slideshow.txt:1.111 pres/slideshow.txt:1.112 --- pres/slideshow.txt:1.111 Mon Jul 23 20:37:30 2001 +++ pres/slideshow.txt Thu Jul 26 01:11:44 2001 @@ -1931,6 +1931,27 @@ ext4.php: Extension Structure opt.php: Optimization +START:pear2:slides/pear:7/26/2001 San Diego - OSCON - The PHP Extension and Application Repository +oscon2001.php: PEAR +agenda.php: Agenda +motivation.php: Motivation +about.php: What is it? +packages.php: Packages +standards1.php: Standards (1) +standards2.php: Standards (2) +whystd.php: Why All These Standards? +currentpkg.php: Currently Provided Functionality +challenges.php: Current Challenges +tut1.php: Making Your Own Class +tut2.php: DB connect/basics +tut3.php: DB prepare/execute +tut4.php: Error Handling +xml1.php: XML Packaging Format (PHP) +xml2.php: XML Packaging Format (C) +tools.php: PEAR Tools +todo.php: Plans Ahead +joinus.php: How to contribute? +questions.php: Questions Anyone? #------------------------------------------------------------- # Default Setting for all presentations. These can be Index: pres/slides/pear/about.php diff -u pres/slides/pear/about.php:1.1 pres/slides/pear/about.php:1.2 --- pres/slides/pear/about.php:1.1 Thu Apr 5 11:33:42 2001 +++ pres/slides/pear/about.php Thu Jul 26 01:11:44 2001 @@ -8,8 +8,8 @@ bullet("Distribution infrastructure"); bullet("Development community"); bullet("Lots of reusable code!"); -bullet("Not aiming to be Yet Another Web Publishing System, but ". - "a toolkit for such"); +bullet('Not aiming to be "Yet Another Web Publishing System", but ' . + 'a toolkit for such'); endbulletlist(); footer(); Index: pres/slides/pear/currentpkg.php diff -u pres/slides/pear/currentpkg.php:1.1 pres/slides/pear/currentpkg.php:1.2 --- pres/slides/pear/currentpkg.php:1.1 Thu Apr 5 11:33:42 2001 +++ pres/slides/pear/currentpkg.php Thu Jul 26 01:11:44 2001 @@ -3,7 +3,7 @@ require 'slide.inc'; bulletlist(); -bullet("Common error-reporting system"); +bullet("Common error-reporting system (PEAR_Error)"); bullet("Emulated destructors"); bullet("Benchmarking"); bullet("Function call/output caching"); Index: pres/slides/pear/standards1.php diff -u pres/slides/pear/standards1.php:1.3 pres/slides/pear/standards1.php:1.4 --- pres/slides/pear/standards1.php:1.3 Tue May 22 17:52:52 2001 +++ pres/slides/pear/standards1.php Thu Jul 26 01:11:44 2001 @@ -3,7 +3,8 @@ require 'slide.inc'; bulletlist(); -bullet("http://php.net/manual/en/pear.standards.php"); +bullet('<a href="http://php.net/manual/en/pear.standards.php">' . + 'http://php.net/manual/en/pear.standards.php</a>'); bullet("Reference docs in comments"); bullet("Always use <?php ?>"); bullet("File, class, variable and function names"); Index: pres/slides/pear/standards2.php diff -u pres/slides/pear/standards2.php:1.1 pres/slides/pear/standards2.php:1.2 --- pres/slides/pear/standards2.php:1.1 Thu Apr 5 11:33:42 2001 +++ pres/slides/pear/standards2.php Thu Jul 26 01:11:44 2001 @@ -9,6 +9,7 @@ bullet("Function name: Foo_Bar_testfunc"); bullet("Constant name: FOO_BAR_CONSTANT"); bullet("Global name: \$_FOO_BAR_global_variable"); +bullet("Private name: \$_variable, _functionName()"); endbulletlist(); footer(); Index: pres/slides/pear/tut1.php diff -u pres/slides/pear/tut1.php:1.1 pres/slides/pear/tut1.php:1.2 --- pres/slides/pear/tut1.php:1.1 Thu Apr 5 11:33:42 2001 +++ pres/slides/pear/tut1.php Thu Jul 26 01:11:44 2001 @@ -2,35 +2,40 @@ require 'slide.inc'; -print "<BR><BR>\n"; -print "<H2>My/Class.php:</H2>\n"; example('<?php - require_once "PEAR.php"; /** - * @author Joe Schmoe <joe@schmoe.com> + * @author Joe Schmoe <joe@schmoe.com> */ class My_Class extends PEAR { - var $str; /** - * Documentation goes here. - * @param string, a string parameter + * Private class variable. + * @var $_str + */ + var $_str; + + /** + * Constructor documentation goes here. + * + * @param string $str A nifty string parameter. */ - function My_Class($str) { - // this is the constructor + function My_Class($str) + { $this->PEAR(); - $this->str = $str; + $this->_str = $str; } - function _My_Class() { - // this is the destructor + /** + * Destructor + */ + function _My_Class() + { $this->_PEAR(); } } - -e?>'); +?>'); footer(); Index: pres/slides/pear/tut2.php diff -u pres/slides/pear/tut2.php:1.1 pres/slides/pear/tut2.php:1.2 --- pres/slides/pear/tut2.php:1.1 Thu Apr 5 11:33:42 2001 +++ pres/slides/pear/tut2.php Thu Jul 26 01:11:44 2001 @@ -2,8 +2,9 @@ require 'slide.inc'; +echo '<br>'; +echo '<h3> Connecting to the database:</h3>'; example('<?php - require_once "DB.php"; $dbh = DB::connect("pgsql://user:password@localhost/mydb"); @@ -13,17 +14,22 @@ exit; } $dbh->setErrorHandling(PEAR_ERROR_DIE); +?>'); + +echo '<h3> Executing queries:</h3>'; +example('<?php $sth = $dbh->query("SELECT totem, pole FROM mytable"); while ($res = $sth->fetchInto($row)) { print "$row[0] : $row[1]<BR>\n"; } -// or this: +?>'); + +echo '<br>'; +example('<?php $sth = $dbh->query("SELECT totem, pole FROM mytable"); while ($res = $sth->fetchInto($row, DB_FETCHMODE_ASSOC)) { print "$row[totem] : $row[pole]<BR>\n"; } -// also try $dbh->setFetchMode(PEAR_ERROR_ASSOC); - ?>'); footer(); Index: pres/slides/pear/tut4.php diff -u pres/slides/pear/tut4.php:1.1 pres/slides/pear/tut4.php:1.2 --- pres/slides/pear/tut4.php:1.1 Tue Apr 10 18:24:20 2001 +++ pres/slides/pear/tut4.php Thu Jul 26 01:11:44 2001 @@ -2,14 +2,16 @@ require 'slide.inc'; +echo '<br>'; +echo '<h3> Setting the default error handler:</h3>'; example('<?php - -// ways of setting the default error handler: $obj->setErrorHandling(PEAR_ERROR_DIE); $obj->setErrorHandling(PEAR_ERROR_CALLBACK, "error_handler"); $obj->setErrorHandling(PEAR_ERROR_CALLBACK, array($obj, "errorHandler")); +?>'); -// returning an error: +echo '<h3> Returning an error:</h3>'; +example('<?php class Foo extends PEAR { function blah() @@ -17,14 +19,15 @@ return $this->raiseError("syntax error", -42); } } +?>'); -// detecting an error: +echo '<h3> Detecting an error:</h3>'; +example('<?php $connection = Net_Socket::connect(...); if (PEAR::isError($connection)) { - print "Ooops: " . $connection->getMessage() . "<BR>\n"; + print "Oops: " . $connection->getMessage() . "<br>\n"; exit; } - ?>'); footer(); Index: pres/slides/pear/whystd.php diff -u pres/slides/pear/whystd.php:1.1 pres/slides/pear/whystd.php:1.2 --- pres/slides/pear/whystd.php:1.1 Thu Apr 5 11:33:42 2001 +++ pres/slides/pear/whystd.php Thu Jul 26 01:11:44 2001 @@ -3,7 +3,7 @@ require 'slide.inc'; bulletlist(); -bullet("Rapid collaboration: Make hacking eachothers' code easier"); +bullet("Rapid collaboration: Make hacking each others' code easier"); bullet("Consistency: Users know what to expect and look for"); bullet("Automation: Programs know what to expect and look for :-)"); endbulletlist(); Index: pres/slides/pear/oscon2001.php +++ pres/slides/pear/oscon2001.php <?require 'slide.inc'?> <br><br><br><br><br><br><h1 align=center>The PHP Extension and Application Repository</h1> <br><h3 align=center>San Diego, July 26, 2001</h3> <br><h2 align=center>Jon Parise <jon@php.net></h2> <br><h3 align=center><a href="http://conf.php.net/pear">http://conf.php.net/pear</a></h2> <?footer()?> Index: pres/slides/pear/tools.php +++ pres/slides/pear/tools.php <?php require 'slide.inc'; echo '<br>'; echo '<h3> pear commandline tool:</h3>'; example('# pear install Log.tgz # pear install http://www.example.com/pear/Log.tgz # pear package package.xml'); echo '<h3> pearize - generates Makefile.in from package.xml</h3>'; echo '<h3> phpize - generates configure script</h3>'; footer(); ?> Index: pres/slides/pear/xml1.php +++ pres/slides/pear/xml1.php <?php require 'slide.inc'; example('<?xml version="1.0" encoding="ISO-8859-1" ?> <Package> <Name>Log</Name> <Summary>Logging utilities</Summary> <Maintainer> <Initials>JCP</Initials> <Name>Jon Parise</Name> <Email>jon@php.net</Email> </Maintainer> <Release> <Version>1.0</Version> <Date>2001-05-15</Date> <Notes> This is the initial independent release of the Log package. </Notes> </Release> <FileList> <Dir>/</Dir> <File>Log.php</File> <Dir>Log</Dir> <File>composite.php</File> <File>file.php</File> <File>mcal.php</File> <File>observer.php</File> <File>sql.php</File> <File>syslog.php</File> </FileList> </Package>'); footer(); ?> Index: pres/slides/pear/xml2.php +++ pres/slides/pear/xml2.php <?php require 'slide.inc'; example('<?xml version="1.0" encoding="ISO-8859-1" ?> <Package> <Name>PEAR</Name> <Summary>PEAR base classes</Summary> <Maintainer> <Initials>SSB</Initials> <Name>Stig Sæther Bakken</Name> <Email>ssb@fast.no</Email> </Maintainer> <FileList> <File Role="php">PEAR.php</File> <LibFile> <LibName>PEAR</LibName> <Sources>pear.c</Sources> </LibFile> </FileList> </Package>'); footer(); ?>