Mining Google Web Services: Building Applications with the Google API

This chapter demonstrates the techniques you can use to access Google with PHP. As with most applications, the idea is to keep the search local, rather than sending the user to the Google site. In addition, you can control the presentation and weighting of the data. However, PHP also opens the possibility of site-specific services ”something you don't need to consider when working with some other languages.

You have some decisions to make at this point. The first is whether you want to use caching to reduce the number of Google Web service requests . Not only does caching provide better performance, but also it helps you keep within the confines of the Google licensing agreement. The downside is that you have to watch out for old data. It's also important to consider the kinds of input you want to allow and the orientation of the search. Make sure you provide some type of user feedback form (discussed in the "Adding Feedback to Your Application" section of Chapter 11) so that you can improve the quality of the search for users who might have different ideas on what they'd like to look for.

Chapter 8 moves from PHP to Java. You'll find that Java is another extremely popular choice. The Google Web Services Kit doesn't provide support for PHP, but it has good support for Java. Although Java isn't quite as easy as PHP to transfer from one platform to another, it's a more popular choice. In addition, you'll find that Java applications run faster because Java performs some of the interpretation required to run the application during a compile cycle. Java still doesn't run as fast as a native code application, but it's a very good choice.

Категории