HomePHP Building a Complete Web Searching Class with Yahoo Web Services and PHP 5
Building a Complete Web Searching Class with Yahoo Web Services and PHP 5
Welcome to the final part of the series “Using Yahoo! Web Services with PHP 5.” As the title claims, this series walks you through the basic concepts surrounding the correct utilization of the most relevant web search services provided by Yahoo! and puts the corresponding theory into practice by utilizing both procedural and object-oriented approaches.
As you possibly know, Yahoo! has recently released a thorough set of Web Service APIs that can be easily consumed by using some popular server-side programming languages, including my favorite one, PHP. If you're interested in learning how to implement these useful services directly from your own PHP 5 applications, then look no further, because you've come to the right place.
Provided that you already went through all of the previous articles of the series, I could say that at this point you should have a pretty solid background in consuming the Yahoo! Web Search Services by way of some procedural PHP functions and a few straightforward classes as well.
As you saw for yourself in the course of the preceding articles, implementing a particular Yahoo! Web Search Service with PHP 5 is a relatively straightforward process, since it only requires an intermediate background in fetching file contents and processing multidimensional arrays using a few common PHP functions.
However, there's one particular thing that you'll certainly recall from the last tutorial: on that occasion I showed you how to utilize the respective Yahoo! traditional and video search services via two modular PHP 5 classes, which implemented some basic methods for performing the searches.
Of course, it's fair to mention here that the signatures corresponding to all these classes were very similar to each other. This naturally implies that it's possible to use inheritance to create one base class, and then derive some sub classes according to the web service that needs to be implemented in a specific case. Sounds pretty logical, right?
So, this last installment of the series will be entirely focused on demonstrating how Inheritance can be used in a helpful way to build a set of child classes that will come in handy for consuming a specific Yahoo! Search Service.
Now that you know the subject of this tutorial, it's time to learn how these web searching classes will be created with PHP 5. Ready to start? Let's go!