php-library.com
 -Home
  
Documentation
-PHP Manual>
Table of contents
Copyright
Preface
Getting started
Language reference
Security
Features
Function reference
Zend API
PHP API:Interfaces for extension writers
FAQ
Appendixes

-Pear Manual>
Table of contents
Copyright
Preface
About this manual
Structure of manual
I) About PEAR
 1. Introduction
 2 Installation
 3 Support
 4 Coding standards
 5 Contributing
 6 FAQ
II) Developer Guide
 7 Introduction
 8 PEAR's meaning for developers
 9 Contributing your own code
 10 The package definition file package.xml
 11 Releasing a package
 12 Supporting PEAR development
III) Core components
 13 PEAR base classes
 14 PPM classes
IV) Packages
 15 Authentication
 16 Benchmarking
 17 Caching
 18 Configuration
 19 Console
 20 Database
 21 Date & time
 22 Encryption
 23 File formats
 24 File System
 25 HTML
 26 HTTP
 27 Images
 28 Logging
 29 Mail
 30 Math
 31 Networking
 32 Numbers
 33 Payment
 34 PEAR
 35 PHP
 36 Science
 37 System
 38 Text
 39 XML
V) PECL packages
 I. Advance PHP debugger
 II. PHP bytecode compiler
 III. Imagick
 IV. KADM5
 V. Radius
 VI. Paradox file access
 VII. Satellite CORBA client extention
 VIII. PostgreSQL session save handler
 IX. Soap
 X. SPPLUS payment system
 XI. Net_Gopher
 XII. oggvorbis

-PHP-GTK Manual>
Table of contents
Copyright
Preface
PHP-GTK userguide
I) Introduction to PHP-GTK
 1. What is PHP-GTK?
 2. What is PHP?
 3. What is GTK+?
 4. Acknowledgements
II) Getting started
 1. Getting the lastest version
 2. Installing PHP-GTK under Windows
 3. Installing PHP-GTK under Unix
 4. How to use PHP-GTK
III) Basic elements
 1. Widgets & containers
 2. Signals & callbacks
PHP-GTK tutorials
I) Hello world tutorial
PHP-GTK reference
I) GTK classes
II) GDK clasesse
III) GTK enums
IV) GDK enums
V) Glade classes
VI) Scintilla classes
Appendix
I) PHP-GTK credits
II) PHP-GTK documentation credits
III) GNU free documentation license
IV) Symbolic names for keys in PHP-GTK
 
More stuff here
 -Contact Us
 -Links
 -
Sitemap
 
 
 
 

Chapter 9. Contributing your own code

PEAR is driven by a open source oriented developer community. Thus there is a chance for everybody to contribute code (in form of a new package or as an improvement for an existing package) to the project. However PEAR aims to keep the quality of the packages at a very high level. Because of that there are certain requirements for contributions, which are listed below.

Requirements for contributing code

There are certain requirements both for the code and for the author of a package in PEAR:

  1. Conforming to the coding standards.

    If you want to contribute your code to PEAR in form of a new package or as an addition to an existing package, it has to be compliant to a set of coding standards. There have been numerous discussions about whether the coding standards are good or not and the decision has been made that they are absolutely necessary. There is no sense in discussing about this.

  2. Extensible and "forward-compatible" code.

    Always keep in mind that your code should be extensible and that it has to be easy to add new features in the future. If there is no easy way to extend the functionality of your code without breaking backwards compatibility with existing code, you should consider implementing a better design before proposing the package for inclusion in PEAR.

    It may be helpful in this context to become familiar with the basic of object oriented programming. Eventhough PHP does not come with full object oriented support yet, the knowledge will possibly help you in maintaining a extensible state for your package code. There are numerous resources about object oriented programming all around the web and you will also find tons of books available for your reading pleasure. However we can can recommend Object-Oriented Programming Concepts over there on Sun's Java Homepage.

  3. Documentation in an appropriate format (plain text, docbook)

    Your code must come with appropriate documentation in one of the following formats:

    If you write the documentation in Docbook XML and if the markup is valid, the documentation can be easily added to the official PEAR Manual, which you are reading right now.

    Note: As of August 2003, phpDocumentor is fully capable of converting in-code API documentation and external tutorials into XML DocBook for use with PEAR. PhpDocumentor version 1.2.2 or greater is required. Install with pear install phpDocumentor. Use the XML:DocBook/peardoc2:default converter on your source code to generate output. The output should be generated directly into the peardoc/lang/package directory, where lang is en, or fr, etc.

    Be aware though that only shipping the API documentation does not suffice! Additionally your package has to come with usage examples and (even better) tutorials about its usage. More information can be found in the section describing how to write documentation

  4. Regression tests in .phpt or PHPUnit format

    All developers have experienced the frustration of bugs. They are a fact of life in programming, but fortunately there are a few systems that can be used to catch them, kill them, and prevent their return. Regression tests should be included with every stable release, so that users can run them if a bug occurs to help you debug the package. Examples of .phpt regression tests can be found as part of the PFC DB package. For examples of PHPUnit tests, see the Auth package.

  5. The contributor ("you") must be willing to provide support for the package and must be willing to release future versions that at the very least fix bugs.

    If you are not willing to maintain your code over a long period of time, it makes little sense to contribute it. PEAR is the standard repository of PHP packages, and this comes with great responsibility. Maintaining means more than just providing support via the various mailing lists:

    You must be willing to not only fix bugs, but also integrate useful enhancements contributed by users of your packages, if they fit the design specifications of your package. You should expect to release new versions of your package regularly with bug fixes. If you will be unable to maintain your package for an extended period of time, it is expected that you will announce this to the PEAR developer mailing list, and assign another temporary lead maintainer or publicly document the fact that your package is temporarily unmaintained, and the approximate date that users can expect to receive support and bug fixes, if possible.

    Warning

    Code can be removed from PEAR if the lead maintainers are not willing to maintain the code anymore and if there is no other person that is willing to take over the maintainership.

 
Network Sites
Domain registration : Register domain name from $5.95
Domain name registration or transfer domain name from $5.95/yr. Includes comprehensive free services such as URL/Email forwarding.
Website hosting : cheap web hosting from $8.95
Website hosting service for single or multiple domain names for as low as $2 per domain.
Cheap domain name registration by cheap domain registrar
Domain name registration and transfer service by Cheap Domain Name Registrar.

 


www.PHP-library.com