Click to See Complete Forum and Search --> : Anyone still using PEAR?
El Zagna
02-13-2008, 06:51 PM
I'm going through the book PHP and MySQL by Hugh Williams and David Lane and they rely heavily on PEAR. I've never used it so I've been poking around the Internet and from what I can tell it's not a commonly use add-on - at least not anymore. The book was copyrighted in 2002 and 2004 which is an eternity in computer years, so I'm wondering if PEAR has been effectively replaced by other frameworks, and if so which ones.
Conceptually it looks like a good thing, but I don't want to go through the trouble of installing, learning and building stuff with it if it turns out that it's "old news".
NogDog
02-13-2008, 07:33 PM
Yes, I use PEAR.
PHP Objects, Patterns, and Practice, Second Edition (http://www.apress.com/book/view/1590599098), copyright © 2008 by Matt Zandstra contains an entire chapter about using PEAR.
Mind you, not everything I've looked at in PEAR turned out to be useful for me, and some packages have such poor documentation that it's questionable how useful they'll be, but it's a good place to start out when looking for reusable classes that you can have a fairly high degree of confidence that they have been tested and should be of decent quality.
El Zagna
02-14-2008, 08:19 AM
Well, I've just spent the better part of two days getting the darn thing installed and working, and I'm not done yet. I'm sure hoping there's some payoff in the end.
I'm a bit worried that the only real endorsements have come - directly or indirectly - from authors, and they tend to work in a different environment that the rest of us.
I see the book you are using was copyrighted in 2008, so that suggests that PEAR is not totally obsolete.
NogDog
02-14-2008, 10:40 AM
Yeah, the installation was not very user-friendly. Once you get it figured out, though, installing PEAR packages is pretty easy: just one command line entry and the rest is done for you.
I think some other reasons you don't see a lot of people using it regularly are: A lot of PHP programmers are not really into object-oriented programming, and thus are not comfortable working with OOP code.
Many programmers, while they'll say code reusability is good, are more comfortable with writing new code in their style rather than using someone else's code that they don't really understand. They don't even know about PEAR. :)
El Zagna
02-18-2008, 08:12 AM
But is another reason that PEAR is not commonly used is that it has been supplanted by other frameworks? Even though PEAR is free there is a significant cost to it in terms of time and effort. I'd rather pay good money for something that I knew was more of an industry standard and had better payback in the marketplace.
NogDog
02-18-2008, 05:54 PM
PEAR is not really a "framework", at least in how I hear the term used these days. It is simply a repository of packages/classes for specific functionalities, not to be confused with web development frameworks such as CakePHP, Zend, Zoop, etc. You might decide to develop with CakePHP, then find you have a special requirement to deal with barcodes, and so incorporate the PEAR Image_Barcode package to take care of that functionality.