BBC: Let me give you money. It’s a lot of money
Jan 10

Gears Future APIs: Notification API

Gears, Google, JavaScript, Tech with tags: , Add comments

Growl

The browser is a fantastic platform to develop applications on. The reach of the Web is unprecedented and the psychology of “installing an app” versus “going to a web page” is huge.

There are still desktop integration features such as desktop shortcuts that link the browser to the underlying host in a nicer way.

One of the missing links is between the browser and the system tray and notification system.

I want to see a Notification API Gear that allows you to tie this together.

Use Cases

Instead of having to install notification agents for applications that you use such as Gmail and Google Calendar, the notification can be built into the applications themselves. You upload a video to YouTube, and it will get back to you when it is done. You choose to “watch” a particular post on the Web? It tells you when there are updates. Google alerts on certain tags do the same.

I find that in my river there are a few occasions where I want to be interrupted (which notifications can do). Depending on your preferences these occasions may be “when my wife emails” or “when someone talks about some cool Ajax thing” or “when someone emails me directly” or “when someone @twitters me”. If I really want to know, I want a notification. If it is slightly less important, I want an email.

In fact, if it is TRULY important, I may even want a text message. This is where configurability comes in. Growl is an event notification for Mac OS X, and it nails all of this. It abstracts the applications from the user. I can go in and change the dials so I get notifications when I want them, how I want them (e.g. in my face, SMS, email), and what they look like (styling). This also includes being able to turn them off.

I want Growl for the Web. Applications can get permission to add events to a notification queue, and I the user can choose how to deal with those notifications.

The API

The API itself should be as simple as possible. This is pretty much a messaging pub/sub system, where the application can publish messages on a queue for its app, with different message types for the type of events.

var notifier = google.gears.factory.create('beta.notifier', '1.0');
 
notifier.notify({
       application: "My App",
       title: 'warning',
       description: 'some text',
       priority: 2,
       sticky: 'True',
       password: 'Really Secure',
});

Growl allows you to have actions in the message itself. That would mean allowing anchor links in the description in the Web world.

There is also the thought that you could also subscribe to various events from other applications, but that can get messy.

System Tray

This notification system could tie into the system tray, or that could be its own API. I worry about the proliferation of tray icons though :)

Beware

The big worry is that people will start spamming the notification system. This is a real concern, and needs to be seriously considered from the beginning. The balance will be in how much we ask users to do, without asking too much so no notifications ever get turned on. With a growl like system it will be easy to turn on and off notifications per application.

What do you think? Is this a useful API?

Other Future APIs

Disclaimer: This is me rambling about APIs and tools that I would love to see in Gears, or the Open Web as a whole. Do you have ideas for cool Gears that make the Web better? Let us know!.

14 Responses to “Gears Future APIs: Notification API”

  1. Jesse Kuhnert Says:

    Fantastic idea! (assuming the worries about spam and such are handled)

    The test doesn’t make it look exactly like my original example (which looked specifically like my firefox gmail extension growl/toaster effect), but it’s the first thing I ever contributed to Dojo. http://archive.dojotoolkit.org/nightly/dojotoolkit/dojox/widget/tests/test_Toaster.html

    It’d be so nice to see something like that working natively….uber cool

  2. noah Says:

    +1 I would have notifications disabled by default, with global on/off *and* white/black list options.

  3. henrah Says:

    Dion! Your link to the Blob API still says “Blog API.”

  4. lunatix Says:

    it would be really usefull if we could set a backgroud javascript process (via WorkerPool) that continue tu run after browser is closed and which is able to send System Tray notification.

  5. Leonardo Says:

    IMO, in an ideal world, applications would ALWAYS be split in engines and clients, and you would have ABSOLUTE control on the visual and interaction style of the client.
    I always thought of this in terms of desktop applications, where it’s more of a challenge because the UI can be more dynamic, but in the web it’s all the more plausible. In fact the big trend with web services could be seen as “enginization”.
    In that context, Growl would be a “read only” client, as in, one that only pulls information, but even then, it makes for an adorable client nonetheless. There could be other customizable frameworks for “write clients”, even thought that’s a lot more ambitious.

    You my friend, are in a position to advance the field. Keep up the good work ^__^

  6. dion Says:

    henrah: Doh, fixed. thanks!

  7. dion Says:

    lunatix,

    Spot on! I will write about that next. Great idea.

    Cheers,

    Dion

  8. Norman Rasmussen Says:

    For Windows there’s something called Snarl (which does the same as Growl)

  9. miranda Says:

    very good
    buy xanax

  10. David Novakovic Says:

    Google demo’d this as a prototype at the developer day in sydney a couple of weeks ago. I really hope they add it as a feature :)

  11. replicahandbags Says:

    thanks for your share.

  12. Rusty Klophaus Says:

    Stitcho.com (www.stitcho.com) was created for this exact purpose.

    Stitcho is Growl for the Web. It allows web applications to tap a user on the shoulder, even when the browser is closed, and it works for both Mac and Windows.

  13. Rusty Klophaus Says:

    Adding link for the comment above: http://www.stitcho.com

  14. Oliver Mezquita Says:

    Yeap, I’d say that this notification system is a must if we want to develop serious desktop-like web apps. And I’m surprised google has not implented this feature in Gears yet.

Leave a Reply

Spam is a pain, I am sorry to have to do this to you, but can you answer the question below?

Q: What are the first four letters in the word British?