PEAR Articles
  Home arrow PEAR Articles arrow My PEAR: The Beginning
Codewalker Forums 
  Tutorials  
Database Articles  
Miscellaneous  
Navigation Usability  
PEAR Articles  
Programming Basics  
Server Administration  
XML Tutorials  
  Reviews  
Database Book Reviews  
Linux Book Reviews  
Miscellaneous Reviews  
PHP Book Reviews  
PHP Software Reviews  
Server Admin Reviews  
SQL Tool Reviews  
  Code Gallery  
Content Management Code  
Contest Code  
Counters Code  
Database Code  
Date Time Code  
Discussion Board Code  
Email Code  
File Manipulation Code  
GUI Code  
Link Farm Code  
Miscellaneous Code  
Search Code  
Site Navigation Code  
User Management Code  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
Download TestComplete 
Forums Sitemap 
Weekly Newsletter 
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
PEAR ARTICLES

My PEAR: The Beginning
By: David Web
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 1
    2008-09-17

    Table of Contents:
  • My PEAR: The Beginning
  • Installing PEAR
  • PEAR Coding Standards
  • Functions

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    My PEAR: The Beginning


    (Page 1 of 4 )

    In the following series of articles, we are going to be exploring PEAR: what it is, how it works, and how widely it is supported. Then we are going to build an application to see how it is used. The best part of the PEAR package is that it comes free with PHP. Personally, I’m very impressed by the way in which PEAR makes it easy to integrate different types of databases. This feature along with many others is what makes this repository so very useful.

    What is PEAR?

    PEAR is an acronym for PHP Extension and Application Repository. It was set up by a PHP developer called Stig Bakken in 1999. The main reason for setting up this repository is to provide an officially sanctioned library of open source components contributed by PHP developers from all over the world, as well as to establish a commonly accepted way for installing those components into installations of PHP. In other words, this repository was created to make life easier for us PHP developers, and with much success.

    Many of the features that are available in PEAR are borrowed from the Comprehensive Perl Archive Network, or CPAN. In fact there are a lot of similarities between the two, especially in the areas of detection and installation of dependent modules. As you will no doubt notice, the packages that are contained in PEAR cover a wide variety of functionality. These include databases, support for reading and writing a variety of file formats, and HTML and XML support.

    To better understand PEAR, let's look at its structure contents:

    • Each area of functionality is represented by a package. Thus PEAR has a variety of packages.

    • The PEAR Manager is used to remove and install packages from a PHP installation

    • PHP Foundation Classes (PFC)

    All packages that are contained in PEAR are distributed in classes. This makes them highly re-usable, so an object-oriented methodology makes a great deal of sense.

    A quick word on PHP Foundation Classes, or PFCs. Basically PFCs offer a variety of functional routines that go beyond the basic functionality of PHP. This means that they offer even more functionality on top of that which is offered by your version of PHP. Some of the foundation classes that are included in PFC are the OS Guess class, the Mail Class, etc. Simply check your PEAR directory to see which foundation classes have been included. The PHP Foundation Classes are updated as and when a new version of PHP is released.

    The PHP Extension Community Library, or PECL, like PHP Foundation Classes, is also another subset of the PEAR repository consisting of components written in C. The reason for components such as these is the need for speed. Components written and compiled in C work a lot faster than, say, a language like PHP. This is especially true when it comes to mathematically intensive ops. PECL provides component developers with the speed and power of C while offering an interface to those components through standard PHP syntax. Though PECL is now a project on its own, it still retains the layout of PEAR. PECL is located at http://pecl.pear.net/

    The other main component of PEAR is the Package Manager. As stated before, the main purpose of this component is to install and remove PEAR packages with ease. Perhaps one of the most noticeable things about the Package Manager is that it is dependency aware. This means that, when you install a particular package that is dependent on one or more other packages, it kindly installs those dependent packages for you. It is also aware of the hierarchy of dependency, so it ensures that those packages are installed in the correct order. This is an especially useful feature because most of the packages that are included in the PEAR repository have dependencies.

    More PEAR Articles Articles
    More By David Web


     

    PEAR ARTICLES ARTICLES

    - Deleting Authors from a PEAR Content Managem...
    - PEAR CMS: Index and Delete Scripts
    - Listing Articles for a PEAR Content Manageme...
    - Building an Authors Page for a PEAR CMS
    - Building the View Details Page in a PEAR CMS
    - Creating the Main Pages of a PEAR CMS
    - Completing the Login Script for a PEAR CMS
    - User Authentication for a PEAR CMS
    - A PEAR CMS: Examining the Code
    - Building a Content Management System with PE...
    - Installing a PEAR Package
    - My PEAR: The Beginning
    - Using XML_RPC2 with PEAR
    - Using Web Service APIs (Amazon and Yahoo!) w...
    - Database Abstraction with MDB2 from PEAR





    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway
    Stay green...Green IT