All Posts Tagged With: "xml"

PHP SOAP vs. SDO

In my role as eBay Platform Evangelist, I spend a lot of time exploring different XML technologies.

SOAP is obviously the big one. I use the PHP 5 ext/soap extension, which is great, but there’s actually another PHP SOAP extension that might be even better. No, it’s not PEAR::SOAP or NuSOAP; it’s axis2.

PHP Trivia Contest: DOM + Default Namespaces

Here’s a question based on a recent PHP bug report which shows why DOM is fun.

Given the following line of PHP:

$xml = DOMDocument::loadXML(
'<r xmlns="urn:a"/>');

The easy way to print the namespace URI of the root node, urn:a, is:

echo $xml->documentElement->namespaceURI;

But how do you retrieve it using DOMElement::GetAttributeNS()? What are the two magical input parameters to coax that value out?

Dirty Secrets of OSCON 2006

Under the heading of better two weeks late than never, here are my slides for my OSCON talk Dirty Secrets of PHP 5’s ext/soap Extension.

As usual, I had a great time at the show. It was fun to see all my old friends and make new ones.

ApacheCon Slides Are Finished

ApacheCon has begun and I am happy to say I have finished my ApacheCon slides. My talk on Consuming Web Services Using PHP 5 isn’t until Wednesday afternoon. Therefore, I technically have a few days left before I need to get up on stage and present, so I’m counting this as a victory for getting my act together in a timely manner.

For this talk, I decided to demonstrate Web services using a number of real Web services, so you can get a flavor for how people are actually implementing Web 2.0. Specifically:

  • del.icio.us (bought by Yahoo! earlier this week)
  • flickr (bought by Yahoo! earlier this year)
  • eBay (almost bought by Yahoo!, almost bought Yahoo!)

And, of course, there’s the obligatory Google Maps reference because, well, it’s a rule or something. I think. I can’t remember.

This was my first presentation done in Keynote. It’s certainly easier to make non-ugly slides in Keynote than in PowerPoint, which almost seems to lead you down the path of ugly slides. You think Microsoft could invest in a few good new templates instead of still using the ones their intern programmers designed in 1992.

If you’re going to be at ApacheCon, let me know. I am arriving Monday afternon and leaving Wednesday night, and staying at the conference hotel. I will have a rental car, so if you know a good place to eat or drink or visit that’s off the beaten path, we can help each other.

How eBay Uses Metadata to Enhance Its Web Services

Alan Lewis has a great article up on XML.com on embedding meta-data inside WSDL files.

Since we rev our Web services API every two weeks, we run into versioning problems that aren’t well covered by existing practices. For example, we define a whole set of complexTypes, but those types can morph overtime and we want to maintain backwards compatibility whenever possible. Or, a piece of data may be mandatory in one call, but optional in another.

Seeking a standards-based solution, our documentation team turned to the appInfo element defined as part of XML Schema. It’s quite a nice idea, and also allows us to auto-generate reference documentation from the WSDL file itself. We’d love for other companies who encounter a similar problem to take a similar approach, so that we can pool resources.

If you’re interested, check out Alan’s piece.

Adam’s Fall Conference Schedule

Now that’s I’m back from FOO Camp, I’m checking my calendar to see what conference events I have coming up. For those of you keeping track (hi mom!), here they are:

  • Microsoft PDC: September 13-16 in LA. I haven’t managed to wrangle a chance to speak yet. :)
  • Zend/PHP Conference: October 18-21 in Silicon Valley. Speaking about eBay Web services. Final talk TBD.
  • ApacheCon US 2005: December 10-14 in San Diego. Speaking on “Consuming Web Services Using PHP 5”.

I may also go to Web 2.0 and the 4D Summit, but I have yet to finalize those events.

The ApacheCon talk should be quite cool, as I will be showing off nifty real-world web services examples. For example, sucking del.icio.us RSS bookmarks into a WordPress blog, or mashing up eBay Web services search results with the Google mapping API. Here’s the full abstract:

As we move into the world of Web 2.0, PHP developers must increasing include Web services in their toolkit of skills. This session covers how to implement REST and SOAP clients using the latest PHP 5 extensions, such as ext/soap, SimpleXML, and xsl.

This is not an academic talk discussing theory and specifications. Examples show applications of popular Web services, including del.icio.us, eBay, and Google Maps.

Don’t be left behind. Come to this session and learn how to integrate Web services into your code.

I have most of the code already written in various places, so there’s only the problem of creating the slides. Once I know more about my other talks, I will pimp them here, so stay tuned for all the details.

Tim Bray on the 80/20 Rule

I’m listening to Tim Bray talk about technology winners and losers over the past decade or two. He’s framing it within the context of Web services (REST vs SOAP), but one of his key takeaways is that of all the major predictive factors, the 80/20 rule has the best correlation between existence and success.

Missing from his list is PHP/FI, which should clearly be filed under winners. People always made fun of the simplicity of PHP (no OO, no namespaces, no Unicode support, etc.) However, you can’t argue with the growth curve.

Tim also references Gall’s Law: “A complex system that works is invariably found to have evolved from a simple system that worked.” So, even though PHP 5 now has fullblown OO support, and we’re working on Unicode, (but still avoiding namespaces), we still keep ourselves rooted in Rasmus’s early principles of simplicity.

If we had tried to jump directly to PHP 5 back in the mid 90s, we never would have made it. We would have had our asses kicked by Perl, Java, or both.

Wanted: One Kick Ass eBay Evangelist

I am on the look out for a top notch evangelist for my team at eBay. If that’s you, or someone you know, contact me.

The eBay Developers Program enables third party programmers to write applications that use the eBay platform. We have an amazing set of web services (over 100 API calls) and want everyone to use them. Not only do we expose almost all of eBay, we do it big time, serving up billions of API calls every month.

Your job would be getting the word out to new communities, getting them excited about the possibilities, and helping them build all sorts of cool applications. In my opinion our platform is particularly interesting because eBay is so dynamic — people are always listing, bidding, and buying. Our web service is more than just search results, and it’s read/write, not read-only.

The official job description has all the details. (That’s job “5731” if the link breaks.) Also, apologies in advance to my fellow Mac and Linux users, our brain-dead job site only works under Windows IE. (It also works under Firefox on Windows, but that doesn’t extend to Firefox Mac or Linux. However, you may be able to spoof your user-agent string.) Please don’t read anything into this and apply it to my attitude towards developers.