Friday, January 11th, 2008
Drinking offline at the Happy Hour while being openly social
<p>Over in Gears land I met with Chandra Patni, the creator of happyhour:Open Social Happy Hour is a port of Open Social Container Sample that employs Google Gears for persistence. It allows data coherency of open social widgets across browser windows.
As I said on the Gears blog:
The motivation for the project was speeding up the development cycle of OpenSocial components by allowing developers to bypass talking to a production server, or even a local one. Load up an HTML file and you are good to go. This also helped when getting designers into the mix as they could just style the HTML and they were done.
The container supports Caja, and adds useful minor features such as munging between a JavaScript date, and an ISO 8601 date that SQLite uses:
JAVASCRIPT:
opensocial.HappyHourContainer.prototype.toISO8601String = function (date) { var zeropad = function (num) { return ((num <10) ? '0' : '') + num; } var str = ""; str += date.getUTCFullYear(); str += "-" + zeropad(date.getUTCMonth() + 1); str += "-" + zeropad(date.getUTCDate()); str += "T" + zeropad(date.getUTCHours()) + ":" + zeropad(date.getUTCMinutes())+ ":" + zeropad(date.getUTCSeconds()); var ms = date.getUTCMilliseconds(); str += "."+(ms <10 ? "00"+ms : (ms <100 ? "0"+ms : ms)); return str; };In your application, you will probably want to pass in a bootstrap callback where you can insert dummy data to get going.
We had a busy day yesterday:
- Brad posted on his thoughts on pervasive Wireless and its effects on the need for offline
- He also talked about Buxfer
- I kept the Gears series going on my own blog, talking about a Notification API that would allow Web developers to get Growl like notifications in a simple way.
Related Content:











It’s cool to support gear which is something we are still trying to learn. I really like Dion’s google series on the blog. Really helps.
Other than that, it’s good to see someone actually get this UTC issue straighten out upfront. I wonder if it takes care of the day light saving issue in different timezone?