<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xml:base="http://townx.org" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
 <title>townx - PEAR - Comments</title>
 <link>http://townx.org/blog/elliot/pear</link>
 <description>Comments for &quot;PEAR&quot;</description>
 <language>en</language>
<item>
 <title>PEAR</title>
 <link>http://townx.org/blog/elliot/pear</link>
 <description>&lt;p&gt;I&#039;ve been fiddling with two &lt;a href=&quot;http://pear.php.net/&quot;&gt;PEAR&lt;/a&gt; packages for PHP, &lt;a href=&quot;http://phpdoc.org/&quot;&gt;PHPDocumentor&lt;/a&gt; and &lt;a href=&quot;http://pear.php.net/package/PHPUnit2&quot;&gt;PHPUnit2&lt;/a&gt;. This is part of an attempt to make my PHP development more structured. These should provide, respectively, a unit testing framework and a system for documenting my code.&lt;/p&gt;

&lt;p&gt;One annoying thing about PHP libraries is that they seem to have multiple incarnations (e.g. a PEAR homepage and another homepage), which reference different versions; and there are multiple libraries with very similar names which do similar things; plus the documentation is appalling in nearly all cases. It took me a while to hunt through the rubble to find what I wanted, but I got there eventually.&lt;/p&gt;

&lt;p&gt;So, still using the trusty &lt;a href=&quot;http://www.apachefriends.org/en/xampp.html&quot;&gt;XAMPP&lt;/a&gt; (which bundles PEAR), I installed these two with a simple:&lt;/p&gt;

    &lt;blockquote&gt;&lt;pre&gt;
    /opt/lampp/bin/pear install --alldeps phpunit2
    /opt/lampp/bin/pear install --alldeps phpdocumentor
    &lt;/pre&gt;&lt;/blockquote&gt;

&lt;p&gt;--alldeps ensures all dependencies of the packages are installed as well. I&#039;ve toyed with PHPUnit and got that working satisfactorily (I think a howto may be in order before too long), but haven&#039;t got round to PHPDocumentor yet.&lt;/p&gt;

&lt;p&gt;PEAR (and the related &lt;a href=&quot;http://pecl.php.net/&quot;&gt;PECL&lt;/a&gt;) are noble attempts to pull together the morass of PHP libraries, but they are still very hard to dig around in. What&#039;s needed for PHP is a kind of &quot;PHP Ubuntu&quot;, which sorts the wheat from the chaff and presents the &quot;best of breed&quot; libraries for particular tasks. Typically this will be the PEAR/PECL libraries, but occasionally there will be gaps or deficiencies in PEAR where you want to know what the good solutions are (e.g. &lt;a href=&quot;http://phrame.sourceforge.net/&quot;&gt;Phrame&lt;/a&gt; for Model-View-Controller, &lt;a href=&quot;http://smarty.php.net/&quot;&gt;Smarty&lt;/a&gt; for templating). I&#039;m hoping that companies like &lt;a href=&quot;http://www.sourcelabs.com/&quot;&gt;SourceLabs&lt;/a&gt; might move into this area and produce an add-on for their &lt;a href=&quot;http://www.sourcelabs.com/AMPstack.htm&quot;&gt;AMP stack&lt;/a&gt;.&lt;/p&gt;</description>
 <comments>http://townx.org/blog/elliot/pear#comments</comments>
 <pubDate>Tue, 03 May 2005 11:04:00 -0500</pubDate>
 <dc:creator>elliot</dc:creator>
 <guid isPermaLink="false">117 at http://townx.org</guid>
</item>
</channel>
</rss>
