Categories
RDF

Creating a PHP Extension out of Redland and Raptor

Recovered from the Wayback Machine.

Since I’ve worked with compiles of Redland before (though long ago), and have Visual Studio 6.0 and am experienced with its use, I’m going to take a shot at creating the PHP extension of Raptor and possibly Redland for Windows. These won’t be a general purpose binary of the libraries. They will be built specifically as extensions for PHP. If anyone has done this before, with VS 6.0, warnings of any odd quirks would be welcome.

C is a powerful language, and I have a lot of respect for it. But I like cross-platform solutions. I like not having to deal with binaries from OS to OS. That’s why I bought into Java long ago, and Perl, PHP, and environments like Mono/C#. However, with each of these languages, you hear folks talk about how they’re ‘too slow’. You ask for specifics, and you’re told they’re ‘too slow’. You ask for requirements, and all you get is ‘too slow’.

Well, sometimes all it takes is a little extra effort, or a fresh perspective, and you might be able to get a cross-platform solution that could work. But you’ll never know because all you get when you ask for details is, “it’s too slow”. Well, chances are the native libraries will also be ‘too slow’, too. How will we know? Without a formal requirement of what’s needed, and specific performance test cases, there’s no way to judge if the native library will even make a difference.

However, I haven’t previously tried creating a PHP extension; this will be a chance to learn something new. These will be external extensions, though, hopefully dropped into PECL, which should be good enough. I wouldn’t try to get PHP to bundle these with the PHP distribution. Too much weight for too little return.

Update:

Unfortunately, I haven’t had success with this porting effort. I’ve put the call out to others to see if I can get some help, but at this time, looks like Redland is staying a Unix-based solution.

And I’ve also been reminded how much I really dislike working with C; about as much I like working with PHP, Perl, Python, and Java. Oh, and now C#.

Sorry to disappoint.

Print Friendly, PDF & Email