[Xapian-discuss] Another PHP 5 wrapper...
Paul Dixon
lordelph at gmail.com
Wed Apr 5 15:18:46 BST 2006
> Paul, it seems that you replied directly to me and not to the list, so I
> will quote your message here with my answers interceeded...
Oops, sorry - well spotted!
> >the one gripe I'd have is "why change the method names?"
> I agree that this is a discutable choice, but let me advocate :
> - I started to develop this wrapper for our own needs, so I applied our
> own naming conventions.
> - it's becoming a current practice in PHP developpement to use
> "lowercaseCamelCase" as a naming convention for methods (zend framework,
> symfony, ez components and many other use it).
> - using the same naming conventions as major php libraries can be an
> advantage for spreading Xapian in php developpement (the "inclusion" is
> more natural)
> - the changes I made are not so important and they are quasi "automatic"
> : the method names are the same, it is just the way they are written
> (set_data // setData). I'm not convinced that it can be a major problem
> for sharing ideas with other persons.
> - a similar choice was done in the java wrapper for Xapian. In fact, my
> wrapper is very similar to the java one. For example, look at :
> http://svn.xapian.org/trunk/xapian-bindings/java/org/xapian/Document.java?view=markup
> - I don't know what will be the API for a "native" wrapper, but I
> suppose that swig can generate any method's name (can't it ?). So it's
> not impossible to imagine that an OO wrapper would follow the same
> naming conventions.
All good points, I didn't realise the java wrapper had renamed
methods, so my argument for retaining consistency with the C++ API is
a moot point :(
If you've got the time to continue developing your wrapper to
completion then I see little point in maintaining my effort, but I'd
be happy to assist if you need help with unit tests etc.
Paul
More information about the Xapian-discuss
mailing list