Gears Future APIs: Notification API
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
- Crypto API
- Developer Tools
- Factory API updates
- Blob API
- Logging API
- Messaging API
- Location API
- Desktop Shortcut API
- Image Manipulation API
- Introduction to the series
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!.
January 10th, 2008 at 12:05 pm
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
January 10th, 2008 at 12:45 pm
+1 I would have notifications disabled by default, with global on/off *and* white/black list options.
January 10th, 2008 at 8:24 pm
Dion! Your link to the Blob API still says “Blog API.”
January 11th, 2008 at 3:53 am
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.
January 12th, 2008 at 5:34 am
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 ^__^
January 14th, 2008 at 10:33 am
henrah: Doh, fixed. thanks!
January 14th, 2008 at 10:34 am
lunatix,
Spot on! I will write about that next. Great idea.
Cheers,
Dion
April 7th, 2008 at 5:55 am
For Windows there’s something called Snarl (which does the same as Growl)
June 2nd, 2008 at 10:14 am
very good
buy xanax
June 28th, 2008 at 7:07 pm
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 :)
July 5th, 2008 at 12:04 am
thanks for your share.
October 10th, 2008 at 7:55 am
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.
October 10th, 2008 at 7:56 am
Adding link for the comment above: http://www.stitcho.com
November 20th, 2009 at 4:16 am
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.