PHP Pear Packages :: Why they are so important to php develo


PEAR is short for "PHP Extension and Application Repository".
It is a standard and structured library of open-sourced code for PHP users, All PHP code is written in standard style
known as PCS ( PEAR Coding Standards ),it helps in maintaining the collaboration between PEAR developers. It is also helpful in quality and portability management. Using PCS, PEAR contributors can provide consistent and similar coding standard packages.

PEAR is a community-driven project. The project has been founded by Stig S. Bakken in 1999 and quite a lot of people have joined the project since then.

The code in PEAR is partitioned in "packages". Each package is a separate project with its own development team, version number, release cycle, documentation and a defined relation to other packages (including dependencies). Packages are distributed as gzipped tar files with a description file inside, and can be installed on your local system using the PEAR installer.

Nowadays it is included in the standard distribution of the PHP installation and default include_path of php.ini in set to include the files from the folder where php pear packages normally installed.

But why PEAR is so useful? PEAR has more than 330 packages ranging from HTTP authentication to XML web services and complicated math equations for engineering calculations.
Database management can be done using DB packages, and mail can be handled using mail packages.There are packages to create the forms and do their validation automatically. You can also create and validate the CSS and HTML of your code.

There are more than 25 packages categories like Authentication, Benchmarking, Caching,Configuration, Console, Database, Date and Time, Encryption, Event, File Formats, File System, Gtk Components, HTML,HTTP, Images, Internationalization, Logging, Mail, Math, Networking,Numbers, Payment, Processing, Science,Semantic Web, Streams, Structures, System, Text, Validate, Web Services, XML.

Using pear, a less experience person can handle the any major technical requirement in their PHP programs.

But PEAR has one major issue with its documentation. Its documentation is not up to the mark and is probably the weakest part of the project. Most modules have some documentation available in the PEAR Manual but much of this is incomplete and crucially there are no links from the package directory entries to the documentation for each package. It's a major short coming because PEAR has a great deal of excellent code that many developers are completely unaware of. The documentation normally created by PHP Documentator.

Some web sites like http://www.zend.com/pear/tutorials/index.php and http://www.phpkitchen.com/index.php?/archives/668-PEAR-Tutorials.html has some good collection of PEAR tutorials.

You can visit the PEAR homepage at http://pear.php.net


About the Author

Zareef Ahmed is php developer based in india, Delhi. He is doing web development since last five-six years.
He can be contacted at zareef@zareef.net. To know more about him you can visit his home page at http://www.zareef.net