cvs: pres /slides/pear/lt2002 about.php agenda.php currentpkg.php gtkinst1.php gtkinst1.png gtkinst2.php gtkinst2.png gtkinst3.php gtkinst3.png
gtkinst4.php gtkinst4.png gtkinst5.php gtkinst5.png joinus.php lt2002.php motivation.php packages.php pearlt2002.cfg pkgex1.php pkgex2.php
questions.php standards1.php standards2.php todo.php tools.php tut.php tut1.php tut2.php tut3.php tut4.php tut5.php whystd.php

From: Date: Sat, 08 Jun 2002 12:11:05 +0000
Subject: cvs: pres /slides/pear/lt2002 about.php agenda.php currentpkg.php gtkinst1.php gtkinst1.png gtkinst2.php gtkinst2.png gtkinst3.php gtkinst3.png
gtkinst4.php gtkinst4.png gtkinst5.php gtkinst5.png joinus.php lt2002.php motivation.php packages.php pearlt2002.cfg pkgex1.php pkgex2.php
questions.php standards1.php standards2.php todo.php tools.php tut.php tut1.php tut2.php tut3.php tut4.php tut5.php whystd.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-4496@lists.php.net to get a copy of this message
ssb Sat Jun 8 08:11:05 2002 EDT Added files: /pres/slides/pear/lt2002 about.php agenda.php currentpkg.php gtkinst1.php gtkinst1.png gtkinst2.php gtkinst2.png gtkinst3.php gtkinst3.png gtkinst4.php gtkinst4.png gtkinst5.php gtkinst5.png joinus.php lt2002.php motivation.php packages.php pearlt2002.cfg pkgex1.php pkgex2.php questions.php standards1.php standards2.php todo.php tools.php tut.php tut1.php tut2.php tut3.php tut4.php tut5.php whystd.php Log: * LinuxTag 2002 PEAR slides

Index: pres/slides/pear/lt2002/about.php +++ pres/slides/pear/lt2002/about.php <?php require 'slide.inc'; ?> <ul> <li><h2>PHP module system for reusable code written in PHP and C</h2> <li><h2>Collection of installation, packaging and maintenance tools</h2> <li><h2>Distribution infrastructure</h2> <li><h2>Development community</h2> <li><h2>Lots of reusable code!</h2> <li><h2>Not aiming to be "Yet Another CMS/Framework"</h2> </ul> <?php footer(); ?> Index: pres/slides/pear/lt2002/agenda.php +++ pres/slides/pear/lt2002/agenda.php <?php require 'slide.inc'; ?> <blockquote><blockquote> <ul> <li><h2>Motivation</h2> <li><h2>What is PEAR?</h2> <li><h2>Standards and Conventions</h2> <li><h2>Current Packages</h2> <li><h2>Community Challenges</h2> <li><h2>Brief Tutorial</h2> <li><h2>PEAR Roadmap</h2> <li><h2>Questions?</h2> </ul> </blockquote></blockquote> <?php footer(); ?> Index: pres/slides/pear/lt2002/currentpkg.php +++ pres/slides/pear/lt2002/currentpkg.php <?php require 'slide.inc'; ?> <blockquote> <h4>Common error handling (PEAR_Error) <br>Emulated destructors <br>Method autoloading <br>Benchmarking <br>Caching (function call/output) <br>Credit card / payment processing <br>Database abstraction + utilities <br>Data validation <br>Date handling <br>E-mail and MIME processing <br>Encryption <br>Filesystem functions (find, search/replace +++) <br>Getopt functionality <br>I18N functions <br>Image Generation and Manipulation <br>HTML forms and templates <br>Logging system <br>Math + Science functions <br>Networking (dns, irc, nntp, pop, ping, sieve, whois +++) <br>PHPDoc <br>SOAP + XML-RPC <br>Lots of XML stuff (XPath, RSS, transformers)</h4> </blockquote> <?php footer(); ?> Index: pres/slides/pear/lt2002/gtkinst1.php +++ pres/slides/pear/lt2002/gtkinst1.php <?php require 'slide.inc'; print "<br><center>"; embed_image('gtkinst1.png'); print "</center>\n"; footer(); ?> Index: pres/slides/pear/lt2002/gtkinst2.php +++ pres/slides/pear/lt2002/gtkinst2.php <?php require 'slide.inc'; print "<br><center>"; embed_image('gtkinst2.png'); print "</center>\n"; footer(); ?> Index: pres/slides/pear/lt2002/gtkinst3.php +++ pres/slides/pear/lt2002/gtkinst3.php <?php require 'slide.inc'; print "<br><center>"; embed_image('gtkinst3.png'); print "</center>\n"; footer(); ?> Index: pres/slides/pear/lt2002/gtkinst4.php +++ pres/slides/pear/lt2002/gtkinst4.php <?php require 'slide.inc'; print "<br><center>"; embed_image('gtkinst4.png'); print "</center>\n"; footer(); ?> Index: pres/slides/pear/lt2002/gtkinst5.php +++ pres/slides/pear/lt2002/gtkinst5.php <?php require 'slide.inc'; print "<br><center>"; embed_image('gtkinst5.png'); print "</center>\n"; footer(); ?> Index: pres/slides/pear/lt2002/joinus.php +++ pres/slides/pear/lt2002/joinus.php <?php require 'slide.inc'; ?> <ul> <li><h2>User mailing list: <a href="mailto:pear-general-subscribe@lists.php.net">pear-general@lists.php.net</a></h2> <li><h2>Developer mailing list: <a href="mailto:pear-dev-subscribe@lists.php.net">pear-dev@lists.php.net</a></h2> <li><h2>CVS mailing list: <a href="mailto:pear-cvs-subscribe@lists.php.net">pear-cvs@lists.php.net</a></h2> <li><h2>CVS modules: <a target="_new" href="http://cvs.php.net/cvs.php/php4/pear">php4/pear</a> and <a href="http://cvs.php.net/cvs.php/pear">pear</a></h2> <li><h2>CVS accounts: <a target="_new" href="http://www.php.net/cvs-php.php">www.php.net/cvs-php.php</a></h2> </ul> <?php footer(); ?> Index: pres/slides/pear/lt2002/lt2002.php +++ pres/slides/pear/lt2002/lt2002.php <?require 'slide.inc'?> <br><br><br><h1 align=center>The State of (the) PEAR</h1> <br><h2 align=center><font face="verdana">The PHP Extension and Application Repository</font></h1> <h3 align=center>Karlsruhe, June 8, 2002</h3> <h2 align=center>Stig S. Bakken &lt;ssb@fast.no&gt;</h2> <h3 align=center><a href="http://conf.php.net/pearlt2002">http://conf.php.net/pearlt2002</a></h2> <?footer()?> Index: pres/slides/pear/lt2002/motivation.php +++ pres/slides/pear/lt2002/motivation.php <?php require "slide.inc"; ?> <ul> <li><h2>A lot of code archives exist, but none offer structure and coherence</h2> <li><h2>Need to install standalone C extensions easily</h2> <li><h2>Need tools to simplify installation/maintenance</h2> <li><h2>Want to build a code-sharing community</h2> <li><h2>Want tight PHP integration</h2> </dl></blockquote> <?php footer(); ?> Index: pres/slides/pear/lt2002/packages.php +++ pres/slides/pear/lt2002/packages.php <?php require 'slide.inc'; ?> <ul> <li><h1>PEAR&apos;s distribution unit</h1> <li><h1>tar.gz format with XML info file inside</h1> <li><h1>Distributed from pear.php.net or a mirror</h1> <li><h1>Code follows PEAR standards</h1> <li><h1>OSD-compliant license</h1> </ul> <?php footer(); ?> Index: pres/slides/pear/lt2002/pearlt2002.cfg +++ pres/slides/pear/lt2002/pearlt2002.cfg $Logo=http://pear.localdomain/gifs/pearsmall.gif $LogoURL=http://pear.php.net/ $NavBarCol=#339900 $NavTextCol=#ccf099 $NavTextSize=16 $TitleTextSize=32 #$output_bg=#CCFFCC $output_bg=#FFFFFF Index: pres/slides/pear/lt2002/pkgex1.php +++ pres/slides/pear/lt2002/pkgex1.php <?php require 'slide.inc'; ?> <br><b><tt>&nbsp;&nbsp;&nbsp;&nbsp;tar tvf xmms-0.2.tgz</tt></b> <?php example(' package.xml xmms-0.2/xmms.php xmms-0.2/xmms.c xmms-0.2/php_xmms.h xmms-0.2/Makefile.in xmms-0.2/config.m4 xmms-0.2/CREDITS xmms-0.2/README xmms-0.2/xmms.glade xmms-0.2/tests/001.phpt xmms-0.2/gtkxmms '); ?> <?php footer(); ?> Index: pres/slides/pear/lt2002/pkgex2.php +++ pres/slides/pear/lt2002/pkgex2.php <?php require 'slide.inc'; ?> <pre> &lt;?xml version="1.0" encoding="ISO-8859-1" ?> <font color="#669900">&lt;package version="1.0"></font> <font color="#669900">&lt;name></font>xmms<font color="#669900">&lt;/name></font> <font color="#669900">&lt;summary></font>Provides functions to interact with xmms<font color="#669900">&lt;/summary></font> <font color="#669900">&lt;status></font>alpha<font color="#669900">&lt;/status></font> <font color="#669900">&lt;maintainers></font> <font color="#669900">&lt;maintainer></font> <font color="#669900">&lt;user></font>rasmus<font color="#669900">&lt;/user></font> <font color="#669900">&lt;name></font>Rasmus Lerdorf<font color="#669900">&lt;/name></font> <font color="#669900">&lt;email></font>rasmus@php.net<font color="#669900">&lt;/email></font> <font color="#669900">&lt;role></font>lead<font color="#669900">&lt;/role></font> <font color="#669900">&lt;/maintainer></font> <font color="#669900">&lt;maintainer></font> <font color="#669900">&lt;user></font>ssb<font color="#669900">&lt;/user></font> <font color="#669900">&lt;name></font>Stig Bakken<font color="#669900">&lt;/name></font> <font color="#669900">&lt;email></font>stig@php.net<font color="#669900">&lt;/email></font> <font color="#669900">&lt;role></font>helper<font color="#669900">&lt;/role></font> <font color="#669900">&lt;/maintainer></font> <font color="#669900">&lt;/maintainers></font> <font color="#669900">&lt;description></font> A simple libxmms extension <font color="#669900">&lt;/description></font> <font color="#669900">&lt;license></font>PHP<font color="#669900">&lt;/license></font> <font color="#669900">&lt;release></font> <font color="#669900">&lt;state></font>beta<font color="#669900">&lt;/state></font> <font color="#669900">&lt;version></font>0.2<font color="#669900">&lt;/version></font> <font color="#669900">&lt;date></font>2002-06-06<font color="#669900">&lt;/date></font> <font color="#669900">&lt;notes></font> Packaging fixes <font color="#669900">&lt;/notes></font> <font color="#669900">&lt;configureoptions></font> <font color="#669900">&lt;configureoption name="with-xmms" default="autodetect" prompt="Xmms library install dir?"/></font> <font color="#669900">&lt;/configureoptions></font> <font color="#669900">&lt;filelist></font> <font color="#669900">&lt;file role="php" name="xmms.php"/></font> <font color="#669900">&lt;file role="src" name="xmms.c"/></font> <font color="#669900">&lt;file role="src" name="php_xmms.h"/></font> <font color="#669900">&lt;file role="src" name="Makefile.in"/></font> <font color="#669900">&lt;file role="src" name="config.m4"/></font> <font color="#669900">&lt;file role="doc" name="CREDITS"/></font> <font color="#669900">&lt;file role="doc" name="README"/></font> <font color="#669900">&lt;file role="data" name="xmms.glade"/></font> <font color="#669900">&lt;file role="test" name="tests/001.phpt"/></font> <font color="#669900">&lt;file role="script" name="gtkxmms"></font> <font color="#669900">&lt;replace from="/usr/local/bin" to="PHP_BINDIR" type="php-const"/></font> <font color="#669900">&lt;replace from="@data_dir@" to="data_dir" type="pear-config"/></font> <font color="#669900">&lt;/file></font> <font color="#669900">&lt;/filelist></font> <font color="#669900">&lt;deps></font> <font color="#669900">&lt;dep type="ext" rel="has"></font>php_gtk<font color="#669900">&lt;/dep></font> <font color="#669900">&lt;/deps></font> <font color="#669900">&lt;/release></font> <font color="#669900">&lt;changelog></font> <font color="#669900">&lt;release></font> <font color="#669900">&lt;state></font>beta<font color="#669900">&lt;/state></font> <font color="#669900">&lt;version></font>0.1<font color="#669900">&lt;/version></font> <font color="#669900">&lt;date></font>2002-06-02<font color="#669900">&lt;/date></font> <font color="#669900">&lt;notes></font> - Mostly a strawman extension, but it does work - Illustrates procedural and OO interface along with a bit of php-gtk <font color="#669900">&lt;/notes></font> <font color="#669900">&lt;/release></font> <font color="#669900">&lt;/changelog></font> <font color="#669900">&lt;/package></font> </pre> <?php footer(); ?> Index: pres/slides/pear/lt2002/questions.php +++ pres/slides/pear/lt2002/questions.php <?php require 'slide.inc'; ?> <br> <table align=center width="90%"><tr><td> <h1>Resources:</h1> <ul> <li><h2>http://pear.php.net/?devme</h2> <li><h2>http://pear.php.net/manual/</h2> </ul> </td></tr></table> <?php footer(); ?> Index: pres/slides/pear/lt2002/standards1.php +++ pres/slides/pear/lt2002/standards1.php <?php require 'slide.inc'; ?> <ul> <li><h3><a href="http://php.net/manual/en/pear.standards.php">http://php.net/manual/en/pear.standards.php</a></h3> <li><h3>Reference docs in phpdoc comments</h3> <li><h3>Always use &lt;?php ?&gt;</h3> <li><h3>File, class, variable and function naming</h3> <li><h3>Indentation:</h3> <?php example('function fooFunction($arg1, $arg2 = \'\') { if (condition) { statement; } return $val; }'); ?> </ul> <?php footer(); ?> Index: pres/slides/pear/lt2002/standards2.php +++ pres/slides/pear/lt2002/standards2.php <?php require 'slide.inc'; ?> <ul> <li><h2>Basic rule: one file per class</h2> <li><h2>File name: Foo/Bar.php, Foo/Bar.so or Foo/Bar.dll</h2> <li><h2>Class name: Foo_Bar</h2> <li><h2>Function name: Foo_Bar_testfunc</h2> <li><h2>Constant name: FOO_BAR_CONSTANT</h2> <li><h2>Global variable: $_Foo_Bar_global_variable</h2> <li><h2>Private name: $_variable, _functionName()</h2> </ul> <?php footer(); ?> Index: pres/slides/pear/lt2002/todo.php +++ pres/slides/pear/lt2002/todo.php <?php require 'slide.inc'; ?> <table align=center width="90%"><tr><td valign=top width="40%"> <h2>For PHP 4.3:</h2> <ul> <li><h3>Polishing Installer</h3> <li><h3>Package Signatures</h3> <li><h3>Set up Mirrors</h3> <li><h3>Web/Gtk Installers</h3> <li><h3>Search Functionality</h3> <li><h3>Polishing PECL</h3> <li><h3>HOWTOs</h3> <li><h3>More Documentation</h3> </ul> </td><td valign=top width="40%"> <h2>Longer-term:</h2> <ul> <li><h3>Application Support</h3> <li><h3>Integrating bugs.php.net</h3> <li><h3>Pre-built and signed Extensions</h3> <li><h3>Distributed Installer</h3> <li><h3>Lots of new packages!</h3> <li><h3>Integrating PHP 5 / Zend 2.0</h3> </ul> </td></tr></table> <?php footer(); ?> Index: pres/slides/pear/lt2002/tools.php +++ pres/slides/pear/lt2002/tools.php <?php require 'slide.inc'; echo '<h3>&nbsp;&nbsp;The PEAR Installer:</h3>'; example(' # pear install Log downloading Log-1.1.tgz ... ...done: 6,331 bytes install ok: Log 1.1 # pear list Installed packages: =================== +-------------------+----------+----------+ | Package | Version | State | | Archive_Tar | 0.9 | stable | | Cache | 1.4 | stable | | Console_Getopt | 0.11 | beta | | DB | 1.2 | stable | | Log | 1.1 | stable | | PEAR | 0.91-dev | beta | +-------------------+----------+----------+ # pear list-upgrades Available Upgrades (stable): ============================ +---------+---------+------+ | Package | Version | Size | | Cache | 1.5.1 | 29kB | +---------+---------+------+ # pear upgrade Cache downloading Cache-1.5.1.tgz ... ...done: 28,873 bytes upgrade ok: Cache 1.5.1 '); footer(); ?> Index: pres/slides/pear/lt2002/tut.php +++ pres/slides/pear/lt2002/tut.php <?php require 'slide.inc'; ?> <ul> <li><h1>PEAR DB connect/basics</h1> <li><h1>PEAR DB prepare/execute</h1> <li><h1>PEAR DB sequences</h1> <li><h1>Error Handling</h1> <li><h1>Making your own PEAR class</h1> </ul> <?php footer(); ?> Index: pres/slides/pear/lt2002/tut1.php +++ pres/slides/pear/lt2002/tut1.php <?php require 'slide.inc'; example('<?php require_once "PEAR.php"; /** * @author Joe Schmoe <joe@schmoe.com> */ class My_Class extends PEAR { /** * Private class variable. * @var $_str string */ var $_str; /** * Constructor documentation goes here. * * @param $str string A nifty string parameter. */ function My_Class($str) { $this->PEAR(); $this->_str = $str; } /** ...phpdoc... */ function doSomething($foo) { if (something_fails()) { return $this->raiseError("something_fails failed"); } return true; } } ?>'); footer(); ?> Index: pres/slides/pear/lt2002/tut2.php +++ pres/slides/pear/lt2002/tut2.php <?php require 'slide.inc'; echo '<h3>&nbsp;&nbsp;Connecting to the database:</h3>'; example('<?php require_once "DB.php"; $dbh = DB::connect("mysql://user:secret@localhost/mydb"); if (DB::isError($dbh)) { print "Database connection failed: "; print $dbh->getMessage(); exit; } $dbh->setErrorHandling(PEAR_ERROR_DIE); ?>'); echo '<h3>&nbsp;&nbsp;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"; } // some convenience functions: $name = $dbh->getOne("SELECT name FROM mytable WHERE id = 42"); $row = $dbh->getRow("SELECT * FROM mytable WHERE id = 42"); $id_to_name = $dbh->getAssoc("SELECT id, name FROM mytable"); $everything = $dbh->getAll("SELECT * from mytable"); ?>'); footer(); ?> Index: pres/slides/pear/lt2002/tut3.php +++ pres/slides/pear/lt2002/tut3.php <?php require 'slide.inc'; example('<?php // prepare query first, then execute it for each row // of $some_array $sth = $dbh->prepare("INSERT INTO mytable VALUES(?,?)"); while (list($id, $name) = each($some_array)) { $dbh->execute($sth, array($id, $name)); } // quick use of placeholders for simple queries $sth = $dbh->query("SELECT * FROM mytable WHERE id = ?", array($_GET["id"])); // using placeholders in convenience functions $name = $dbh->getOne("SELECT name FROM mytable WHERE id = ?", array(42)); // using placeholders for LOBs $sth = $dbh->prepare("INSERT INTO table VALUES(?,&)"); $dbh->execute($sth, array($_GET["id"], $name_of_uploaded_file)); // fetch your id first (not using mysql-style auto-increments) $nextid = $dbh->nextId("sequencename"); $res = $dbh->query("INSERT INTO table VALUES($nextid, ....)"); ?>', '100%'); footer(); ?> Index: pres/slides/pear/lt2002/tut4.php +++ pres/slides/pear/lt2002/tut4.php <?php require 'slide.inc'; example('<?php // Setting the default error handler: $obj->setErrorHandling(PEAR_ERROR_DIE); $obj->setErrorHandling(PEAR_ERROR_TRIGGER, E_USER_WARNING); $obj->setErrorHandling(PEAR_ERROR_PRINT, "Whoops: %s<br>\n"); $obj->setErrorHandling(PEAR_ERROR_CALLBACK, array(&$this, "errorHandler")); // Raising an error: require_once "PEAR.php"; class Foo extends PEAR { function blah() { return $this->raiseError("syntax error", -42); } } // Catching an error: $connection = Net_Socket::connect(...); if (PEAR::isError($connection)) { print "Oops: " . $connection->getMessage() . "<br>\n"; exit; } ?>'); footer(); ?> Index: pres/slides/pear/lt2002/tut5.php +++ pres/slides/pear/lt2002/tut5.php <?php require 'slide.inc'; example('<?php require_once "PEAR.php"; require_once "DB.php"; // this way you do not have to check errors after DB::connect PEAR::setErrorHandling(PEAR_ERROR_DIE, "Database connection failed: %s\n"); $dbh = DB::connect("mysql://user:secret@localhost/mydb"); // Do not die if we get an error with the code DB_ERROR_ALREADY_EXISTS $dbh->expectError(DB_ERROR_ALREADY_EXISTS); // Now insert data, and just display a warning (but proceed) if // a row already exists $sth = $dbh->prepare("INSERT INTO users (uid,name) VALUES(?,?)"); foreach ($new_users as $user) { $id = $dbh->nextId("users"); $res = $dbh->execute($sth, array($id, $user)); if (PEAR::isError($res) && $res->getCode() == DB_ERROR_ALREADY_EXISTS) { print "Whoops, the $row[1] user already exists<br>\n"; } } // reset the expected error code $dbh->popExpect(); ?>'); ?> Index: pres/slides/pear/lt2002/whystd.php +++ pres/slides/pear/lt2002/whystd.php <?php require 'slide.inc'; ?> <ul> <li><h2>Faster collaboration: Makes hacking each others&apos; code easier</h2> <li><h2>Consistency: Both users and developers get used to a common style</h2> <li><h2>Predictability: Easier to know where to look</h2> <li><h2>Automation: Programs know what to expect and look for</h2> </ul> <?php footer(); ?>
« previous php.pear.cvs (#4496) next »