Monday, 31 July 2006

Sharing Gadgets



Some gadgets are simply better when you share them, and if you're thinking of creating such a gadget, you're in luck. By means of the Communication API, Google Desktop allows a gadget to exchange data with another instance of the same gadget on a friend's computer. Through Google Talk, you can send and receive short strings (up to 2 kilobytes) of anything you want -- text snippets, chess moves, whatever.

You start by setting a handler for incoming data. Then you can list the user's Google Talk friends and even determine if that friend is idle or busy. By knowing this, you can then send data to this friend and be certain that it will be received by your gadget. On top of that, you can ask Google Talk to open a conversation window with that same pal for those times when you just have to gossip.

There's already TicTacToe, a sample in the SDK that uses the Communication API. We've just added a new sample, TalkTester, which shows you how easy it is to use this seemingly limitless API.

Monday, 24 July 2006

Hybrid scripting



So you're writing a gadget for the contest and you've come on something simply impossible to do using the existing Script API. Say, for example, you need a more advanced message box that has "Yes", "No," and "Cancel" buttons, while our API only gives you a message box with just an "OK" button. Instead of redesigning your application to avoid this, you can write a hybrid script gadget to add the desired functionality. A hybrid script gadget has an <object> tag in its gmanifest file that specifies a COM component which implements features we never imagined you'd want to do.

I've written up a simple example (HybridYesNoCancel) for those of you wondering how to do this. Included with the sample is a readme file which describes, step-by-step, exactly how to do it. You can get everything in the Google Desktop SDK.

And now that the deadline has been extended, it's not too late to create something new and exciting for the contest!

Thursday, 20 July 2006

More time and tips for creating gadgets



Due to user feedback, we've decided to extend the deadline for the Google Desktop Gadget Contest by two weeks. You now have until Monday, August 14, to submit your gadget. Winners will be announced on September 5. For more details, check out the contest homepage.

And for those of you thinking about the look and feel of your gadget, here are some general tips:

1. Buttons, checkboxes, and tabs should look clickable. Mouseover, mousedown, and disabled states are needed to inform users that the button is active or inactive, and also to confirm interactions.


normal state
mouseover
mousedown
Checkbox (To-do checkbox)
Button (Remove button)
Tab (Playlist tab)


2. Create selected and unselected states for your tabs. The usual UI design that defines a selected tab are 1) removal of any lines that separate the tab and its content area (a la the Windows tab UI), and 2) matching the color of the selected tab to its content area.

My Music tab is selected Playlist tab is selected


Live tab is selected Matches tab is selected



3. Use a gentle, light color for backgrounds. When selecting backgrounds, avoid intensely bright colors that can cause eyestrain. (These kinds of colors should be used very sparingly in general.)



The left image shows good color usage, while the one on the right is harder to read.



4. Take advantage of a "details" or "expanded" view. If the gadget is info-centric and primarily text-driven, try to offer "details" or "expanded" views, like news and web clips. These views allow you to display a lot of information in an efficient way.

5. Group similar items together. When there are many buttons or links, try to group relevant buttons and links together. This not only makes it easier for people to find the functions they're looking for, but it also helps them remember where things are.

6. Follow conventions. If a button is commonly used in a UI--like the close, remove, and OK buttons in Windows or Google Desktop--try to follow the conventions associated with those buttons and place them accordingly.

For example, a close button is always on the upper right corner.

Details view Options window

Wednesday, 12 July 2006

Personalize your gadget



Now that the Google Desktop Gadget Contest is running, I have a tip for how to personalize your gadget: make it react to what the user's doing. For example, I buy books on Amazon a lot, and I realized that I was doing a very similar query over and over -- looking up reviews for the books I found interesting. I realized that I could create a Google Desktop Gadget that watched for when I was visiting Amazon, and then performed a query on the title of the book I was looking at. Voila, the gadget then displays those Google search results in the Sidebar.

The source code for this gadget (named I'm Feeling Lucky) can be found in the samples section of the Google Desktop SDK.

Here are some other ideas for personalizing that might inspire you:
  • When someone is reading blogs, show the top posts from Technorati or Digg or another popular aggregator.

  • Silly pictures! When someone is reading an email message, find a picture online, or on their computer, to associate with the sender -- and whenever the gadget sees that person's name, show the picture. Add some utility by making the picture respond to clicks.
You get the idea! Make the experience more personal. And have fun doing it!

Wednesday, 5 July 2006

Google Gadgets galore!



Gadget lovers alert: we've added 200+ more of your favorite Google Gadgets for Google Desktop. In the past, some of these useful bits were trapped in a browser; now you can set them free anywhere on your desktop or in your Sidebar. To find the new ones, just choose "Add gadgets" from the Sidebar or check them out online. And if you want to make your own cool gadgets for the Google homepage, here's the developer guide.