WebGuild's Future of Web Apps Panel + Gears Boilerplate




Two quick updates from Gears land. First, we'll be talking this evening (January 16th) on WebGuild's Future of Web Apps panel here on the Google Mountain View campus. You can submit your questions through the web to have them asked tonight, even if you can't make it.

Second, Jeremy Moskovich has created a very useful Wiki page containing Gears Tutorials and Sample Code. The idea here is to have boilerplate for integrating Gears into different kinds of environments, such as .NET, JQuery, etc. Right now it is more of a template that is waiting to be filled out by the community, so if you have experience using Gears in a particular environment please add it to this page.

Taking the happyhour OpenSocial party offline with Gears




We ran across happyhour, an OpenSocial container that implemented the JavaScript API in JavaScript itself. The happyhour project uses Gears to keep the social content around across sessions, which is an issue with a pure in-memory solution. This allows you to more easily login as multiple users in different browser windows to see "friend" interaction.

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:
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.

Brad Neuberg and I got to chat with Chandra Patni, the developer behind the project, and you can watch and listen to his thoughts below:

Snakes on a (Wireless) Plane




There is a meme going around that once ubiquitous (cellular or WiMAX) wireless access pervades everywhere that we won't need the offline or performance abilities of something like Google Gears, Dojo Offline, or Adobe AIR. This seems logical -- why do we need the ability to cache the UI and data of web applications locally, for example, if the magical wireless connection in the sky is always available? The argument then continues that the only place this stuff would be useful is on airplanes, where WiMAX and cellular connections won't reach.

The last few weeks I've decided to test out this hypotheses and see if it is real. Every morning I have about a one hour to an hour-fifteen minute commute on the Google Bus from San Francisco to Mountain View. Rather than stare zombie-like out the window for most of the time during the very early hours I now need to rise, I decided to buy a Verizon Wireless Internet Access card. As William Gibson says "The future is here. It's just not evenly distributed yet." So I decided to distribute a little bit of that future here and now and give ubiquitous Internet access a try. The hypotheses: once I had this card and universal Internet access, would something like Google Gears seem unnecessary?

As so often happens with these kinds of things, the results were unexpected and counter-intuitive. While the wireless card is truly cool and pretty much makes the Internet available almost everywhere (with pretty good speeds), the basic fact of wireless Internet connections is that they have high latency, very high latency.

What is latency? Latency is the amount of time that it takes for my request for some information to reach the source of that info, and then for the response to come back to me. I can have Internet communication channels that are very fast, such as satellite access, but which have very high latency, on the order of seconds.

Wireless networks have high latency. It's just a basic fact. The strange thing I found is this:

Pervasive wireless access makes Google Gears, Dojo Offline, Adobe AIR, and others even more valuable

Huh? How could that be?

Right now I'm writing this blog post in a local text editor. The reason is that even though I could load up the Blogger UI, it takes a while to snap into place because of the wireless network's latency. Instead, I just popped open my local text editor because it appears so fast.

The pain of opening web applications on wireless networks can be jarring. What if, instead, the application simply appeared, right when I opened the browser? This is akin to not needing a splash screen as a desktop app loads. The performance difference between being able to instantly access your app, whether it is remote or local, is huge, and tools like Google Gears make this possible.

With Google Gears, your web application can cache its UI locally, so that every time I navigate to it the UI springs to life instantly. On a wireless network I had to wait for that UI to appear, sometimes for several seconds. The difference is small but has a huge effect on whether users want to migrate their applications and life to using online apps. Speed matters. The difference between instant and several seconds has huge implications for user satisfaction and usability.

With Google Gears, once the UI of my web app appears instantaneously, I can begin to get work done with some of the cached local data as the web app makes contact with the remote web server. Because I see the UI instantly and can start working, it doesn't matter to me if the latency on pervasive wireless networks is slow because I can get work done now.

Reliability also became important as I used the wireless card. I'm sure all of us have had the experience of talking on our cell phone and having the connection drop; this happens to me all the time. While the Verizon Wireless card is actually very good and quite reliable, the connection would still drop from time to time. If this happened in the middle of Gmail loading, for example, or while I was working on a Zoho document, then things got very annoying.

Pervasive wireless means that the connection will drop sometimes. This argues even more for the kind of data and UI model that Google Gears makes possible. If I am working against a local cache, and the network disappears then reappears, I won't even notice much of the time since that activity occurs on a background thread.

If you are interested in learning more about how Google Gears can give your web applications greater performance and reliability in the coming era of pervasive wireless then visit the Google Gears section of http://code.google.com.

Google Gears and Personal Finance




Google Gears is about much more than just offline. With Gears, you can create websites that use the local server and database to accelerate performance and provide innovative new functionality.

We've been waiting to see web applications that use Gears to do much more than just offline. Buxfer, an interesting new personal finance web site, has a host of powerful features, such as auto-syncing with all of your banks and credit cards. One interesting feature is that they are using Google Gears. If a user chooses, they can have their personal finance data stored locally in the Gears database rather than on the remote server. This is very powerful -- you can now get the convenience of web applications, while retaining control over your personal data:
While synchronizing your financial accounts, you can save the
authentication information offline on your computer using Google Gears.
Next time you click on 'Synchronize', Buxfer will use the information
stored in Google Gears, and you won't need to type it again.

You will have the convenience of not needing to login into your
financial institution repeatedly, as well as the peace of mind that
your private information is secure and completely under your control!
VentureBeat has a great article and review on Buxfer. A snippet from VentureBeat concerning the Gears functionality:
Like Mint and the others, Buxfer has introduced a way to let you easily synchronize your financial accounts from Bank of America, American Express, Citibank credit cards, Chase credit cards, and more than 300 others with your personal finance information on its site. It uses Google Gears to download your financial account information — your username and password — to an offline Buxfer component that lives on your computer, that syncs with your online Buxfer account. It’s the company’s policy to never store this sensitive user information on its servers. It accesses the data stored on your Google Gears database on your computer, and authenticates you and your information with your financial institution. You can delete the data or make it unavailable to Buxfer whenever you want.

Mint has received some heat from those concerned about letting a web startup store their personal data on its servers. Wesabe, like Buxfer, offers a set of financial information upload tools, so you can store your data on your own computer, then sync it with that site — we’ve found Buxfer’s implementation of this offline component to be easier to use.
[via TheMoneyUpdate]