Chapter 7. Diving into Extensions: Gadgets API

The complexity of gadgets can vary from lightweight utilities that perform simple tasks to fairly sophisticated applications that integrate with other services and applications (including robots). A participant’s experience with a gadget can vary as well, depending on how the gadget handles changes in state. One gadget may display pretty much the same changes to all participants, while another gadget may display only specific changes to participants, depending on what type of information needs to be communicated.

As we did with robots in the previous chapter, we’ll start out by working through a few examples of code using the Gadgets API. I have designed the gadget examples with the goal of incorporating concepts and API methods that you are likely to use in your own gadgets. We’ll review the Gadgets API in more detail in the second half of the chapter.

Let’s Code a Few Gadgets

Before we get started, I’d like to remind you that gadgets rely primarily on JavaScript and HTML, so you’ll want to make sure that you’re up to speed on these two languages before proceeding. As I did with the robot code examples, for the sake of brevity I won’t include some of the basic steps that I covered in Chapter 5, including how to make your gadget accessible on the Web and how to create images for your gadgets.

Election Gadget: Soliciting ...

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.