Hi Frank,
On Wed, 5 Sep 2001, Frank M. Kromann wrote:
> > I can't help but notice that MSSQL, Sybase, and Sybase CT-Lib each have their
> > own PHP extension. What I wonder if many people have /not/ noticed is that
> > two of these extensions implement the same C API on different platforms (mssql
> > targetted for Windows systems, sybase targetted for Unix systems), and all
> > three implement the same database protocol on the wire.
> This was true for MSSQL 4.x and 6.x but the databases and the protocol have
> evolved different in the two products (MSSQL vs. Sybase) since. Microsoft
> has not updated DBLibrary since version 6.x so there is a few features
> available in 7.0 and 2000 there is unsupported in the PHP extension. If
> Microsoft decides not to update DBLibrary I will start rewriting the
> extension using a more up to date protocol in order to support all features.
> I would furthermore prefer to develop the extension to work from both Win32
> and *nix clients.
If you choose to rewrite an MS SQL extension using Microsoft's new client API,
I hope that PHP will still retain *one* extension built on top of dblib.
CT-Lib and Microsoft's new APIs are more feature-rich than dblib, but dblib is
the most portable of the three, so it makes sense to keep an extension around
that's built on dblib -- /if/ PHP makes use of its cross-platform
capabilities, that is. :)
Perhaps the best choice would be to merge ext/mssql and ext/sybase into a
single module that's named for what it really is -- ext/dblib. This leaves
the namespace clear for a future ext/mssql built on top of a different API.
I'm not sure how you would write an extension on top of Microsoft's new API
that works on Unix systems, however. Has Microsoft released client libraries
for Unix?
> > In light of this, would it not be to everyone's advantage to consolidate
> > developer efforts and merge the ext/mssql and ext/sybase modules? (Providing
> > appropriate PHP_FALIAS wrappers for backwards compat, of course.) I can't
> > imagine that there is so much difference between these two codebases that we
> > need one extension with a .dsp file and one extension with a config.m4 file.
> The MSSQL extension (on Win32 only) do have a few functions more but these
> could be ported into one of the Sybase extensions.
Ok, but then you're talking about porting -- which means that every time a new
feature is added to one extension, someone also has to port /that/ feature to
the other extension, as well.
What is the advantage here to keeping *two* dblib extensions around, instead
of one that has all the features of both? It may be a little easier to be
able to ignore compatibility with other platforms, but I'd certainly be
happier to see one extension that gets twice as much use (and therefore
testing).
> I dont know muct about Subase and Sybase-ct but I agrre that these extension
> should be combined into one, with aliases and functionality from the mssql
> extension to allow access to MSSQL Server 4.x and 6.x from Win32 and *nix
> clients.
The differences between the Sybase and Sybase-CT extensions lie in the
underlying C APIs that they invoke. Combining these is not feasible.
Combining ext/mssql and ext/sybase is very feasible -- I've done much of the
rewriting already, I just need to get my development box back on-line before I
can share it.
Steve Langasek
postmodern programmer
--
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]