More Debate on PEAR

Tweet

Via Tobias Schlitt, Alexey Borzov kicked off a huge debate on PEAR quality and standards, part inspired by another discussion that raises a number of very valid issues related to PEAR (Sitepoint Forums regulars will spot a familiar name or two).

On one level I get a little weary of this topic, it seeming to repeat itself without clear resolution. It’s much like talking about template engines in PHP. At the same time, comments following Alexey’s original remark manage to stay fairly focused on specific issues rather than an all out rant, which is encouraging. Question is, what happens when it drops off everyones mental radar? Will specific points be followed up? Will we see additional volunteers willing to submit time to “right the wrongs”?

Just to fragment the debate yet further, some random thoughts on PEAR

- Should use a PHP forum application such as phpBB. Whatever the technical issues (mirroring etc. etc.), one aspect of PEAR is that it’s a community of developers. Mailing lists work for small teams to stay in touch but not much else, IMO. Forums like Sitepoint’s Advanced PHP forums result in a higher level of debate and greater participation. Ask Sitepoint, for example, how successful communities are built.

- Accept Simple Test as an alternative PHPUnit. Sorry but (someone needs to stick their neck out) PHPUnit just doesn’t cut the grade. Missing features like Mock Objects are essential. Right now I guess only about 20% (if that) of PEAR packages come with unit tests (and PHPUnit itself isn’t one of them). Simple Test would change that – it’s easy to use, it’s exceptionally well documented, it’s comes with tests of itself (big hint), it’s well evolved and is even packing “web testing” functionality (it can act as a web browser, for testing HTML). Unit tests are critical to PEARs success as whole. Without unit tests, PEAR will remain many small pieces.

- Quality cannot be directly quantified. Try Zen and the Art of Motorcycle Maintenance. At the same time, a combination of “approximate measures”, such as download statistics, can be used to see what’s “important”.

- Survey the users (survey tool?). “Can we ditch PEAR.php?”

- PEAR is “funded” by voluntary contributors, acting largely independently. That will always be a limitation, same with most all Open Source. In general, if too much manual intervention is required, my guess is PEAR will stall. At the same time the CPAN approach – welcome all comers – results in a mess. Clever use of tools has to be the way forward – automation with key decisions made by humans. The propsal system seems like the right way to go.

- Simplistic points of view “sux/rocks” contribute nothing. PEAR is a complex subject and requires thought. It also needs active contributors.

- Thousands of man-hours have gone into PEAR. Starting from scratch is not the way to go.

- PEAR needs a wiki – ideally integrated with a PHP manual-like user comment system.

- More thoughts here.

Free book: Jump Start HTML5 Basics

Grab a free copy of one our latest ebooks! Packed with hints and tips on HTML5's most powerful new features.

  • http://simon.incutio.com/ Skunk

    I agree with almost all of your points, with the exception of a web-based forum instead of a mailing list. The vast majority of open source projects I know of use a mailing list rather than a forum, and with good reason: forums are simply too time consuming, and also require all participants to habitually return to a specific place on the web at least once a day. If you’re involved in more than a few communities this quickly becomes impossible. With mailing lists, you can “subscribe” to as many communities as you like and have them delivered right to your doorstep. I hardly ever have time to contribute to forums these days (unfortunately) but I’m following over a dozen mailing lists without too much trouble.

  • culley

    I would add “accept phphtmllib as an alternative to html_*”. It is better designed than the html packages in PEAR.

  • mwmitchell

    A forum is one thing I’ve actually really wanted for Pear. I dig forums and think they are the best place to communicate! Mailing lists seem so stone age.

    Matt

  • Dan Kuykendall

    I personally find PEAR to be a good collection of code that I have to de-PEARify everytime I want to use them. PEAR has far too many interdependancies and I have found it impossible to use directly in projects I work on.

  • http://www.lastcraft.com/ lastcraft

    Hi…

    A mailing list with good archive access can look just like a forum and a forum can act just like a mailing list. Mailing lists still require monitoring and you can fill your mail boxes pretty quick. What if you use several different computers? Also when you sign up you don’t have access to half started discussions with a mail list.

    You need both.

    yours, Marcus

    p.s. Regarding mock objects in PEAR::PHPUnit, if you check out Sebastians site I am helping out in writing them. Except that…er…no one actually told me this :). He is currently writing a test coverage tool. It uses XDebug rather than apd (PEAR) though. Funny old world.

  • http://www.phppatterns.com HarryF

    Perhaps a forum that’s a front end to a mailing list would be a “killer app”? Post with browser or email etc.

    My main grief with mailing lists is the interfaces available to browse them online (when you’re not using some sort of newsreader – nntp is fairly “firewall unfriendly”). PHP|Architect has a slightly improved front end to the PHP mailing lists http://www.phparch.com/mailinglists/ (search is better) but not to PEAR. Also forums like vBulletin and phpBB come with a nice features like “who’s who”.

  • http://www.phppatterns.com HarryF

    p.s. Regarding mock objects in PEAR::PHPUnit, if you check out Sebastians site I am helping out in writing them. Except that…er…no one actually told me this :). He is currently writing a test coverage tool. It uses XDebug rather than apd (PEAR) though. Funny old world.

    Guess that’s good news but Simple Test works now, not tomorrow. BTW: http://pear.php.net/xdebug

  • http://maetl.coretxt.net.nz/ maetl

    a forum might help to coalesce more of a coherent community effort, but I’m not sure it will necessarily solve the most outstanding problem I see with PEAR, namely it’s lack of a coherent architecture.

    By architecture I’m not just talking about class diagrams or the conventions surrounding PEAR.php, use of raiseError etc. I can think of many questions a newcomer might have that it’s very difficult to find an effective answer/starting point on…

    Is PEAR just a ‘grab bag’ of random classes? Is there/should there be an underlying framework approach? What kinds of coverage is the repository aiming for? I’m not going to speculate here on what the right or wrong answers might be, I just want to emphasise that good architecture is a social process and based around high level decision making. Without that kind of leadership, it won’t be clear what PEAR is actually there for and how to make the most of it…

    combining the functionality of a forum with a mailing list (since they’re just different views of a topic/person posting structure) will provide the foundation for a more active and visible community… but maybe there needs to be a more transparent advisory structure (how exactly does the package acceptance/QA procedure work again?).

    After all – PEAR is as far as it gets, ‘official’ to PHP…

  • http://www.phppatterns.com HarryF

    a forum might help to coalesce more of a coherent community effort, but I’m not sure it will necessarily solve the most outstanding problem I see with PEAR, namely it’s lack of a coherent architecture.

    Very true – a forum is really a sideshow in the general question of how to improve PEAR. Just random thoughts…

    Is PEAR just a ‘grab bag’ of random classes? Is there/should there be an underlying framework approach? What kinds of coverage is the repository aiming for? I’m not going to speculate here on what the right or wrong answers might be, I just want to emphasise that good architecture is a social process and based around high level decision making. Without that kind of leadership, it won’t be clear what PEAR is actually there for and how to make the most of it…

    Agreed. Perhaps one example that highlights the point is Iterators. Should PEAR provides a standard set of iterators, implemented in PHP? Right now it doesn’t and when putting together SaxFilters I had to implement IO iterators to allow XML to be “streamed”.

    There are many packages within PEAR that would benefit from standards iterators IMO – suddenly you have an agreed “protocol” for, say, HTML_Table to render results from PEAR::DB or PEAR::VFS and the combination of these packages becomes much greater than the sum of the parts.

    I put the question of Iterators to PEAR once here – the small response is very revealing I think (not meant as a criticism of any involved), both of PEAR’s perceived role and of the views of many PHP developers towards how PHP should be used (the conclusion was basically – “It’s PHP’s job, not PEAR’s”).

  • hanumani

    I think that PEAR is doing a great job and should not be so relentlessly questioned and insulted. I agree whole heartedly that the mailinglists are not sufficient. I suggest that PEAR use the mailing lists for developer interaction, but that each package have it’s own forum / wiki that users can post support and/or intrest queries to. This knowledgebase would of course be moderated by the lead developers or whoever to make sure only valuable questions stayed on the page. It’s really a pain in the butt currently to get community help in USING PEAR packages, especially because the standards are a bit low documentation wise on many PEAR projects…

    my 2c.

  • culley

    Could someone with more free time than me please fork pear, move it to sourceforge and do this right?

  • http://maetl.coretxt.net.nz/ maetl

    “It’s PHP’s job, not PEAR’s”

    You are right suggesting that in the current situation, a forum might be a sideshow, but it does offer the prospect of what I would describe to be a ‘community of practice’ in the scientific sense… Without rambling on too much about sociology of knowledge, science studies etc, I don’t think it would be going too far to compare some of the things that have evolved from the Advanced PHP forum to ideas about scientific paradigms, group consensus, and the strength of testing inductive logic via argument. Email lists are the best way to have rapid disussions – but the web based interface feels like a ‘home’, and that’s important… Having this central place is a major part of stimulating the community… not to mention the enhanced communication that is made possible with syntax highlighting of code, etc…

    there are compelling reasons for questioning/evolving PEAR from the user perspective, but there are also compelling reasons for leaving it alone, mainly the fact that PHP is a specialized ‘toolkit’ language in and of itself. If PEAR doesn’t work how you think it should, you just write the code your way, and perhaps start a Library or Framework project of your own. (chances are tho, it won’t have such a sophisticated install or distribution system ;)

  • Lukas

    Just a side note .. lately alot of people have said that PEAR needs to support or define standards for all sorts of new PHP5 features. While most of the people suggesting exceptions everywhere should probably reconsider some other suggestions while valid dont make sense to be “tested” in PEAR. For one thing PHP5 is far from stable, however PEAR taks BC seriously (or atleast increasingly seriously). So it makes little sense for us to be chasing after PHP5 at this time. Of course developers are playing with PHP5 and we are pondering where to go once its ready, but I guess to me atleast PEAR is not a place to play with new features.

    Anyways the wiki things is definately needed. And its just a question of when we will get a wiki integrated into pearweb and not if. I think that time is approaching rapidly as this has been on the table since a few months.

    The comment system has also been on the table. Its funny that alot of people say PEAR sucks because it lacks this or that and they make it sound like we dont want to have it. Obviously our ressources are limited so if you care then submit feature requests or even better submit the necessary code.

    On the topic of forums: they tend to work well for endusers but not for developers in my experience. Someone recently started a german pear forum and we definately encourage other people to start pear forums of their own.

    On the topic of add pacjage FooBar to PEAR because BarFoo simply doesnt cut it. Propose it to PEAR! If the package you are proposing follows a different approach then all is well. If the package follows the same approach and just adds a few features we ask to talk to the author in question to see if the packages should either be merged or if the new package should become the new major version of said package. However if you are not interested in the effort then dont whine about it either. Accept the fact that PEAR is not about redundant packages. If that is a problem for you then look elsewhere (or write an RFC to change it).

    On the topic of survey’s we had a survey which unfortunately few people participated.

  • Tyler Tompkins

    Wouldn’t it make sense to create RSS feeds for forums, which then enables the “stone age” system of mailing lists to semi merge with the newly favored systems created in the form of forums? I would argue that using RSS is a good way to bring these communities together,

  • Sebastian Bergmann

    PHPUnit is a 1:1 port of JUnit to PHP. PHPUnit 2.0.0 will be released as soon as PHP 5.0.0 is out and will feature-identical to JUnit 3.8.1. Also note that PHPUnit 2.x includes a port of JMock, a Java / JUnit MockObjects extension.

  • http://www.ministryofwebdevelopment.nl Charlie-ministry

    I also found the urge to discuss with people about PEAR on forums. None were found (only in german language).

    I like mailinglists but I know a bunch of people that prefer forums over mailinglist.

    I decided that I want to contribute and setup a forum for PEAR:
    http://www.pear-forum.org

    Still a bit quite but it is a matter of time ;)
    – Charlie

  • asmictech

    Am beginning to accept the fact that PEAR is meant for Intranet Applications only.
    Many a web hosting firm does not support PEAR. They would not install neither help the customer out on installation.
    Lately, I have a problem installing it on my host. I contacted them if they could tell me the path to their temp folder and make it writeable. But they refused to give helping hand.
    I like pear because of its capabilities but of what significance is it to Internet sites when hosting firm don’t support it.

    I have only successfully installed it on a linux server of one of my web hosts out of five of them. All other windows installations have been hell safe my PC/Laptop.

  • rick

    asmictech, with whichever host you are using why not just create your own pear directory and name it something obscure. You could even require authentication to access anything within using an htaccess file. Then upload the pear packages of your choice and set your include path to the pear directory. It doesn’t take up much space.