With PHP 5 looming on the horizon, packing OOP features that look like Java’s greatest hits, is it time to take another leaf out of Java’s book and begin a PHP Community Process?

A while back phpdeveloper was asking if PHP Needed a Spokesman as a figurehead, much like Perl has Larry Wall and Python has Guido Van Rossum. Personally I think the PHP project does better by not being a cult of personality but rather the collective input of some highly talented developers but I do agree there is certainly the need for a person or group focused on bringing some standards to PHP.

The subject came up at PHP Everywhere that when you compare PHP with Java, PHP has alot of catching up to do to offer as rich an environment for developing applications.

If you read the March Edition of PHP Architect, in particular Stuart Herbert’s article on “Exploring XSLT Processing Options Within PHP“, you’ll know that having been “burnt” by the native PHP XSLT extension he had to use the Java extension to get access to Saxon via Java’s JAXP API (how many layers of abstraction?).

“JAXP provides a standard API for accessing, and using, XML parsers from different vendors. This allows Java developers to change their XML parser without having to change their code.”

The JAXP API was developed as a result of the Java Community Process.

Given that PHP 5 provides us with interfaces, this would be a great opportunity to standardize many of the open source project out there.

For example there are a number of good database abstraction libraries out there, such as ADOdb, PEAR::DB and Eclipse. If an interface is specified as the standard API for databases, each library could implement that interface meaning we can swap PEAR::DB for ADOdb without needing to modify code.

Considering SOAP, Activestate’s SWSAPI provides what is effectively a cross language interface that can easily be applied to PEAR::SOAP and NuSOAP, as both still bear a fairly close relationship (PEAR::SOAP began as NuSOAP).

1)

The same applies to XML-RPC, there being at least 6 projects out there plus a PHP extension which provide an XML-RPC implementation. XML-RPC highlights where a standard interface could be extremely valuable; if we define a common API which applies to both the native XML-RPC extension and to a number of XML-RPC libraries written in PHP, the code we write which uses the API could be used without modification on servers where the XML-RPC extension is not installed.

In other words we’d have a solution to one of the problems which effects those developing PHP applications; if we write an application that depends on a particular extension we immediately make it useless to all those whose web hosts have failed to provide the extension.

Perhaps PEAR is the right medium to develop a standard set of interfaces for PHP but to make it work my opinion is it needs “groupware” which will encourage active involvement from PHP developers not closely related to the core project ( many PHP developers seem to prefer apps like vBulletin and phpBB to news groups... )

Using the injenuity PHP developers display for design web based applications, something that is a cross between a forum (allow active discussion of design), a version / revision tool and a code documentor fits the bill.

Looking at PHP Database Driven Documentation Architecture from the Aditus Software ( developers of JpGraph ) we might be talking the foundation for such a tool.

With the right leaders and facilities, a “PHP Community Process” could potentially be a supercharged equivalent to the Java Community Process.

1) A lesser known fact is the native XML-RPC extension also supports SOAP 1.1 and can easily be used to provide a web service which delivers both XML-RPC and SOAP at the same time (without needing to modify code). I spoke briefly to Dan Libby once, it’s author, who I believe is no longer maintaining it due to lack of time. Hopefully someone will bring this extension to a full release eventually so people can start bashing their hosts to install it.

advocacy/time_for_a_php_community_process.txt · Last modified: 2005/10/15 21:47