Re: Package proposal: XML_Query2XML
| From: | Justin Patrin | Date: | Mon, 27 Feb 2006 15:55:30 +0000 |
| Subject: | Re: Package proposal: XML_Query2XML | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-41515@lists.php.net to get a copy of this message | ||
On 2/27/06, Lukas Feiler <lukas@empoweredmail.com> wrote:
> Hi list!
>
> I developed (and documented very well) a package that might qualify as a
> PEAR package.
>
> Query2XML: http://query2xml.sourceforge.net
>
> Query2XML allows you to transform the records retrieved with one or more SQL
> SELECT queries into XML data. Very simple to highly complex transformations
> are supported. It was written with performance in mind and can handle large
> amounts of data. No XSLT needed.
>
> I wrote Query2XML because XML_sql2xml was just not flexible enough for my
> needs. Query2XML also uses PHP5's new DOM XML classes.
>
It looks useful. You'll probably need to change your error handling,
though. I appeciate that you're giving your users options, but part of
PEAR is a unified error handling mechanism. For PHP5 packages this is
PEAR_Exception. PHP5 packages should not be returning PEAR_Errors. In
addition, I'm not sure why you have an option to return errors as
XML... I suppose this couls allow for directly passing errors back to
some kind of webservice or XML handler directly but this doesn't
really belong in the package itself, especially since it's causing
extra code to be added for each error. I suggest you change your
package to *only* throw exceptions and to allow excpeptions to bubble
up in places where you're doing no real error handling. If a user
wants to create an XML error they can add their own exception handler
around calls to this package.
In addition, you should really create a real PEAR proposal (which
requires a PEAR account). This will allow us to keep track of what's
been suggested and done.
--
Justin Patrin