Skip to Content
Google Wave: Up and Running
book

Google Wave: Up and Running

by Andres Ferrate
March 2010
Intermediate to advanced
304 pages
8h 23m
English
O'Reilly Media, Inc.
Content preview from Google Wave: Up and Running

Gadget Design

Even though Google Wave gadgets and generic Google gadgets share similar structure and functionality, some design considerations are specific to Google Wave gadgets. The following sections serve to highlight some of the design considerations that you may want to consider as you start developing gadgets. They’re based in part on the “Google Wave Gadgets API Reference” documentation (http://code.google.com/apis/wave/extensions/gadgets/reference.html).

Programming Logic

Developing gadgets is fairly straightforward. However, you should take the following considerations into account for the programming logic you will use with gadgets.

Do not attempt to access objects during initialization

Gadgets rely on callbacks for a variety of things, including the initial function processed when a gadget is added to a wave. The gadgets.util.registerOnLoadHandler(init) method is used to declare the initial function (in this case the function is named init).

Because a wave’s state and participants do not have any accessible values until their callbacks have fired, you should refrain from attempting to access these objects within the initial function. Instead, register callback functions within the initial function using the appropriate callback methods (wave.setStateCallback and wave.setParticipantCallback). This will ensure that your code does not run into any issues trying to apply methods to undefined objects.

Most of the logic should be inside of callbacks

Your code should rely on relevant ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

Exploring the JDS Linux Desktop

Exploring the JDS Linux Desktop

Tom Adelstein, Sam Hiser
Performance Tuning for Linux® Servers

Performance Tuning for Linux® Servers

Sandra K. Johnson, Gerrit Huizenga, Badari Pulavarty

Publisher Resources

ISBN: 9781449378646Errata PagePurchase book