by
Mika Tuupola (tuupola@appelsiini.net), Pierre-Alain Joye (paj@pearfr.org)
To celebrate the fact that PEAR is out of beta and as of PHP 4.3 PEAR
installer is included by default, Weekly News is revived again. As a
preface to this first weekly news, please find an interwiew of Stig S.
Bakken, the founder of the PEAR project.
This week's news include details on voting for proposed packages,
PEAR tutorial on Mac OS X, new phpdoc templates and missing PEAR
installer from Windows binary distribution. As a time of writing there
have been eight new releases this week.
AN INTERVIEW OF STIG BAKKEN
by Pierre-Alain Joye (paj@pearfr.org)
Who's Stig Bakken ?
Stig (30) has been working with Unix and web stuff for the last 10
years. Since 1999 he has worked as a senior software engineer at Fast
Search & Transfer (FAST) in Trondheim, Norway. FAST is Google's main
competitor in the OEM search market, and Stig is the technical lead for
FAST's multimedia search product. See www.alltheweb.com (written in PHP
of course) for a demonstration.
What's PEAR ?
PEAR is a PHP spin-off project that aims to provide several things:
a library of high-quality, reusable PHP code and extensions
coding guidelines that help create components with consistent APIs
a packaging, distribution and installation framework for these components
The acronym stands for "PHP Extension and Application Repository".
We made up the acronym before the meaning of course.
What's PECL
PECL (the PHP Extension Code Library) is a subset of PEAR for
traditional PHP extensions written in C or C++.
What is the relation between PHP and PEAR/PECL, we have seen a lot
of extensions moving from PHP to PECL (and it seems more will move
in the future) ?
More and more extensions move to PECL, and by the time PHP 5 is out,
most extensions will have been pickled ("PECL'ed"). This is first of
all a project management change for PHP. Future versions of PHP will
still bundle lots of extensions, they will be imported from PECL during
the PHP release process and included in the release tarball.
The reason we do this is to make PHP's release process manageable.
Today a PHP release takes several months. By importing stable releases
of extensions in PECL into the PHP source distribution, rather than having
them as part of PHP CVS, we will have fewer unknowns that need to be
tested during PHP's QA process, because the extensions from PECL have
already been through their own QA. Hopefully this will reduce the PHP
release process to weeks rather than months, and increase the general
quality of all extensions bundled with PHP. I want to emphasise that
this pickling process does not mean that users will have no
extensions bundled with PHP. PHP will still bundle exceptions, but
higher quality is expected of bundled extensions in PHP 5.
Also, if extensions are built shared (not compiled directly into PHP,
but as dynamically loadable libraries), it will be possible to upgrade
individual extensions without upgrading PHP.
What are the differences between the core PEAR (package manager, core
modules) and the rest of PEAR ?
The "core" packages bundled with PHP are of two types: those required
for the installer, and a set of packages that are of high quality and
considered of common interest. The latter set of packages is the start
of what hopefully will become the "PHP Foundation Classes" (PFC).
May the package manager and the package definition may be used by
any PHP developper for their project, private or commercial ?
Anyone can set up their own copy of the pear.php.net web site and use it
for distributing in-house PHP components. There are several projects
already that are starting to use the PEAR tools for their own purposes.
What are the next main achievements for PEAR ?
First of all, the Windows installer support has to be solid. Due to
xmas vacation and some bad timing, the 4.3.0 Windows installer was
shipped without PEAR. 4.3.1 will fix this.
We need to get win32 binary releases of PECL packages out.
Then we need to get a portable package signature infrastructure up and
running, so people can feel comfortable with installing binary
releases. This is way harder for PEAR than it is for say RPM, because
the PEAR installer runs on a myriad of platforms and PHP configurations.
And there is lots of work ahead in making a PHP 5 migration plan.
More and more people are involved in the PEAR community, by adding
new functionnalities or alternative competitive packages, how do you
manage it ?
We have a voting process on the pear-dev mailing list, where people
actually collect votes for a specific package name. Usually, packages
are not rejected, even if they overlap with some other package. But
since we have a single mailing list for PEAR developers, authors of
"competing" packages find eachother quickly and find a good solution by
their own initiative. My own role is just to nudge the community in the
right direction from time to time.
PEAR-DEV traffic
Who can vote?
Interesting question arised on the list whether you need
a CVS account to vote for or against proposed packages or not.
Instructions
on how to contribute mentions a "developer". Since you can be a
developer without having a CVS account, anyone on the list can
be qualified for voting.
PEAR on Mac OS X tutorial
Pierre-Alain Joye spotted a nice
tutorial on how to setup PEAR on Mac OS X.
The tutorial seems quite complete starting from laying the groundwork by
installing php cli and setting up proper enviroment variables.
You can also find instructions on how you can: install and use PEAR
package manager, generate developer documentation from phpdoc and
last but not least how to use PEAR classes in yours applications.
Additionnal link: PHP and Mac
The tutorial could be used as a guide for installing PEAR on traditional
unices too the only difference being you would probably like to compile
the php cli from sources yourself.
What we are still missing is a similar tutorial for Windows...
PEAR phpdoc template
Christian Dickmann announced his PEAR templates
for PHPDoc are almost finished and is looking for some feedback.
The templates themselves look really nice. Some additional features such as
possibility to generate docs for every released PEAR package, browser or
download the apidoc and upload a development release to see if looks
fine with the layout.
The templates are supposed to be used with
phpDocumentor.
Windows packaging mistake
To add some more confusion for Windows users with problems installing PEAR,
the PEAR installer was not included in the Windows binary distribution.
This was not intentional and was caused by a packaging mistake.
This is a mistake and will hopefully be corrected in 4.3.1.
Bugs and Fixes
Thanks to these people for spotting and fixing some bugs:
Lorenzo Alberton, Tobias Schlitt, Michele Manzato, Markus Wolff
New and Proposed Packages
HTTP_Header, HTTP_Header_Cache
Wolfram Kriesing suggested new packages which implement common
header methods and methods for handling cache headers.
DB_Abstract
Wolfram Kriesing also suggested a querybuilder and executer package
which is based on DB. This package has some similarities with
DB_DataObject but is more focused on query building that dataobject
building.
Enterprise A&A
Tony Bibbs suggested a new Authentication & Authorization package. After
further discussion raised the possibility of merging his package and
LiveUser.
GTK_VarDump
Alan Knowles proposed a class which does a VarDump to GTK window.
Development
Active on CVS this week has been: Net_SMTP, DBA_Relational,
PECL::session_pgsql, PHPUnit, DB, MDB, XML_Transformer, HTML_QuickForm,
PECL::soap, Net_SmartIRC, Cache_Lite, HTML_Template_Xipe, PECL::tclink,
Net_SMTP, Mail, Perm_LiveUser, I18N, Spreadsheet_Excel_Writer,
Pager_Sliding, XML_XPath, Net_UserAgent, Image_GIS, File_HtAccess,
HTML_TreeMenu, DB_QueryTool, HTTP_Header