mozilla-services/services-central — pull request #8 by jbalogh (2012-05-10 20:45:21+00:00)
Title: Notifications in services-central

Hey guys I wrote some code I hope you like it! (cc @mconnormoz @indygreg @rnewman)

Are pull requests ok? Would you rather have this in Bugzilla?

This is a couple patches that start up services/notifications. I don't know what I'm doing inside Firefox, so the structure and style are probably not great. Some parts I copy/pasted. Please be harsh.

I think the `NotificationSvc` singleton should eventually become something like the app-startup WeaveService.

From the README:

Here lies most of the moving parts for push notifcations in the browser. DOM
and UI bindings will live elsewhere; these files deal with talking to the API,
storing messages, and creating persistent connections to the notification
server.

Structure:

services.js::Service
This is a singleton that manages API calls and message storage. It's an
instance of the NotificationSvc class. Messages and state are persisted to a
JSON file on disk.