Following on from my RFC about an interface mechanism, what we really
need is some brainstorming on what interfaces we need or would like to
have in PHP.  I'm aiming at PHP 5.

The following concepts have already been mentioned either by myself or
others as being something we'd like to see in PHP:

DOM XML nodes/documents ---> XSLT processor.
Image Handle --> PDF, SWF or some other extension with image
embedding/processing.
Socket / Network "behaviours" for streams.
Memory Buffer accessors for streams (direct access to memory streams
buffers, or access to file contents via mmap or some other mechanism).

What we need is to have the specifics worked out; the last few items are
relatively easy, but for something like XML we need to think about
sticking to a common subset of features that we can rely on, and
therefore a common set of methods that we would need in our interfaces.
Perhaps we might need 2 or 3 (or more) interfaces to properly deal with
XML based resources.

If you have any other ideas where an interface would be useful, even if
you think it sounds silly, post it here.  If you've ever thought "it
would be great if I could use an XXX resource in the YYY extension
functions", then we could implement that behaviour using interfaces.

Remember, these interfaces are intended to be used in the C extension
code, not for PHP scripts, so please don't get them confused!
I know that some of this functionality can be handled in user-space by
using some kind of wrapper scripts or libraries, but it would be
extremely useful for PHP to do some of these nice things without relying
on glue scripts.

Why am I making so much noise about this?  A couple of recent threads,
despite degenerating into madness, have raised a few good points about
how PHP could evolve to become even better than it is now.
I see the interface idea as one method for this kind of improvement.

--Wez.


-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to