Even as I write this book, there seems to be an overwhelming degree of interest in Google Wave extensions within the general developer community. This high level of interest is beneficial for both end users and developers. The ongoing development of new extensions and gadgets represents an ever-increasing set of tools and resources available for a diverse set of Google Wave Client users. In similar fashion, the knowledge base for development with the Google Wave platform seemingly will increase as more developers contribute to Google Wave extensions.
The use of robots and gadgets inherently is subject to trial and error, and it may take you a few tries with different robots and gadgets to determine their suitability for use in particular waves in the Google Wave Client.
There is a Google Wave Samples Gallery that serves as a running index of both robots and gadgets. The Samples Gallery can be found at .
The Samples Gallery is a great starting point to learn about robots developed by members of the Google Wave team and third-party developers, and it allows you to search or filter listings by various parameters, including keywords. Figure 4-10 shows the Samples Gallery filtered to display only robots.
As you can see, each listing includes a short description of each robot, a demonstration wave, and source code (if available). So, for example, if you’re looking for a social news robot, you might find the Reddit robot a handy addition to your wave.
Tip
The Samples Gallery is intended primarily for use by more technical users and developers. In the future, many of the extensions listed in this gallery will be integrated into several waves that allow users to access robots and gadgets directly, without having to visit this web page (in similar fashion to the Extensions Gallery wave).
In the previous chapter we worked with a few basic robots to get an idea of how these automated participants can interact with us in a wave. Let’s now take a look at some more complex robots and how they can be used with waves.[27]
Bloggy (blog-wave@appspot.com) is a robot that publishes the contents of a wave to blog sites. Programmed in Python, Bloggy highlights how robots can interact with third-party services to integrate content from the Google Wave Client to other websites.
Bloggy works by dynamically creating a blog that contains your waves at http://blog-wave.appspot.com/<your Google Wave username>. The blog is based on a template from Blogger, Google’s blogging platform, and each wave is displayed within a blog page as an embedded wave. If you take a look at Figure 4-11, you can see the test wave in which I added Bloggy and added some blips.
Figure 4-11. After I added Bloggy to my wave, I added a few blips and some media, which Bloggy published to a new blog (Figure 4-12).
Shortly after I added Bloggy, the wave was added to http://blog-wave.appspot.com/cartosoft (Cartosoft is the name of my company, which I used to sign up for early developer access to Google Wave). The same wave created in the Google Wave Client is visible on the blog that Bloggy created for me (Figure 4-12).
Figure 4-12. The blog page showing my latest wave, updated in real time by Bloggy. It’s almost too easy!
Changes to the wave are updated in real time on the blog. Note that because the wave is embedded, other participants I add to the wave can reply from the blog page. Go ahead and try it yourself. Create a new wave, add Bloggy as a participant (blog-wave@appspot.com), and then check out your new blog at http://blog-wave.appspot.com/<your Google Wave username>.
Cody (codeditor@appspot.com) is a programming code–formatting robot. Programmed in Java, Cody responds to input by participants by adding a Color button to the bottom of a blip (see Figure 4-13).
When this button is clicked, Cody reformats the blip and highlights code in different colors according to the language that it detects or that you specify. As you can see, the PHP code that I input into my original blip is reformatted after I click the Color button (Figure 4-14).
Cody is a nice example of how robots can serve as virtual assistants that enhance your blips without much intrusion. You should try a couple of different types of code with Cody, including Java, HTML, and JavaScript.
Buddy as a Service (buddyasaservice@appspot.com) is a Python robot that leverages several third-party web services to provide responses to a variety of queries. Buddy as a Service is a good example of a robot that taps into other APIs, including the Yahoo! Boss API and Google’s Search API, to easily extend the information in a conversation in an automated manner.
After you add the Buddy as a Service robot, it will add an initial blip with some basic instructions (Figure 4-15).
So, typing in buddy:help
yields a new blip with a
set of instructions (Figure 4-16).
Using the query operators, I can perform a search for the
weather in Chicago using weather:Chicago
, and Buddy as a
Service edits my blip to add the weather results (Figure 4-17). Adding news:Guatemala
to a
new blip returns search results for news about Guatemala (Figure 4-18).
As you can see, various types of robots can be used with waves, and the previous examples barely scratch the surface of what is currently available (in fact, you could probably fill a whole book with examples of robots). We can only guess that there will be an ever-increasing number of robots available to fulfill a diverse set of needs. In the next chapter we’ll discuss the Google Wave API in more technical detail, including some of the fundamentals of developing robots.
Developers are enthusiastically embracing the Google Wave API to develop a variety of client-side tools, games, and mini-applications that integrate with third-party services. As with robots, there are numerous gadgets listed in the Google Wave Samples Gallery. Let’s take a look at a few gadgets that are representative of some of the features and functionality that can easily be added to a wave.
Checky is an interesting proof of concept that allows participants to add a simple checklist to a wave. Some creative use of Ajax allows participants to add items and reorder list items using drag-and-drop. You’ll find the XML for the Checky gadget at http://wave-gadgets.appspot.com/checky.xml.
We’ll test the gadget by copying the gadget’s XML URL and then pasting it into the text input box that is displayed when you click the gadget button (it looks like a puzzle piece) in the conversation pane toolbar (see Figure 4-19). Notice that after you add Checky, your editable blip can be populated with a dynamic checklist (Figure 4-20).
After you add and configure Checky, other participants can modify the checklist and check off items as needed. I updated the checklist on my wave in Figure 4-21.
Checky should give you a good idea of how gadgets add a greater level of utility to a wave. Note that this gadget also shows information (state) can be stored on the server (more on that in the next chapters).
Figure 4-19. There are several ways to add gadgets to a wave. In this example, I am manually adding an externally hosted gadget using the URL to its XML source.
Figure 4-21. My updated checklist for a day of surfing. I easily removed some items and rearranged the order of the list items.
Checky should give you a good idea of how gadgets add a greater level of utility to a wave. Note that this gadget also shows information (state) can be stored on the server (more on that in the next chapters).
The Napkin gadget is a visual tool that allows participants to collaborate on a canvas as if they were drawing on a napkin. After the gadget is added to a blip, it loads a simple interface that allows participants to add free-formed lines of varying width and colors, complete with undo and clear buttons. You’ll find the XML for the Napkin gadget here: http://my-wave-gadgets.appspot.com/wave/NapkinGadget.xml.
As you can see in my sample wave in Figure 4-22, I have added a basic flowchart to my wave using the gadget. Assuming that I added other participants, they could go in and add their ideas on the “napkin” or add their own Napkin gadget in a separate blip.
Figure 4-22. My doodle on the Napkin gadget shows a basic flowchart, complete with multicolored elements.
This gadget is built on Adobe’s Flex framework for Flash, so it serves as a good example of how Flash-based gadgets are supported in the Google Wave Client.
The Raffly gadget demonstrates how gadgets can access a list of all participants (and their respective attributes) in a wave. Raffly can be used to select a “winner” from the participants included in a wave by clicking a Pick a Winner button. In Figure 4-23, I have a wave with several participants, and I used Raffly to select a random participant to be the winner of a virtual raffle for a free lunch.
Figure 4-23. Pamela won a free lunch after Raffly selected her at random (though we all know there is no such thing as a free lunch).
You can click the button multiple times to select additional winners as well. Although it may seem simple, imagine the possibilities for extending this gadget to not only select a participant but also to automate several processes, including communicating the results to other web services or processing instructions based on a participant’s profile (e.g., automatically adding the participant’s photo to a social network).
By now I expect that you feel fairly comfortable with both types of extensions and understand how they are utilized in waves. In the next chapter we’ll take a more technical look at extensions as we discuss the Google Wave platform and use of its APIs.
[27] It would probably take an entire book to cover all the robots already available for Google Wave (yes, even at its early stages). For the sake of brevity, I have included several examples that highlight some of the current features and capabilities of the Google Wave platform.
Get Google Wave: Up and Running now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.