Published on 2007-06-05 11:47:15

Gears documentation is really great with many useful samples and tutorials and a very well documented API. Not difficult to at all to get familiar with, just get ready to deal with SQLite in your JavaScript which is not common in local-side scripting. Note that Google gears is compatible with Firefox 1.5+ and Internet Explorer 6.0+, no Safari support is mentioned yet even if Mac is already a supported OS.

Why going offline ?!

Many ask this question, why offline support while Internet connection is becoming more and more accessible and fast over the world. The answer is simply because offline support is now the only thing missing to make web applications seriously compete with Desktop. AJAX and RIA was a step into the user interface and made web applications more interactive, but very quickly hit the limitation of the browser and we would like to make more on the client side.

Offline support come here to broke this limitation, offer an extra local storage, and provide more functionalities for AJAX applications. Best demo of what offline support can provide to AJAX web applications is Google Reader, which enable you to read 2000 most recent items even when your computer is not connected to the internet. Probably a good reason to switch from my GreatNews (desktop) to Google reader (web). There are tons of usages of offline web-apps where Internet connection is not allowed, in planes for example.

Apollo and Gears

Ryan Stewart, RIA Evangelist on the Platform Team at Adobe, announced that Apollo will include an SQLite database. But that's not everything, there is also a partnership with Google at this level :

Google and Adobe are working together with the aim of making the APIs for accessing the SQLite database similar for developers. The vision is that any Gears applications could be ported to Apollo (and vice versa) using roughly the same data structure that they use in Gears. The parallels will be great for developers.


Gears Up AJAX Frameworks

Google Gears is still in beta, and currently there are some problems for example with install on some PC behind proxies and firewalls, but certainly we'll see more fully supported platforms in the future. Adopting Google gears or another offline solution is just question of time. The fact that Google Gears is open source will certainly encourage the adoption by AJAX frameworks, as Dojo toolkit is already doing.

Google Gears and security

Security is the second big issue of offline support after data synchronization, and the security concerns here are not that different from what you could face elsewhere in web development. The general rule, never trust external data, and be sure to always validate in the server-side. The second worry is similar to cookies, what if they got stolen from a malicious website ?! You can do nothing here besides keeping your browser updated and get always the latest versions. Firefox users have an advantage on this point according to

Conclusion

So if you think "Offline" is IN, Gears could be an excellent solution for you : open source, free, used by Google Reader. It's not very common that Google releases a new technology and start using it that quickly. The solution itself is really great, especially the choice of SQLite, worth to give it a try and give some offline functionalities to your AJAX application.

Previous Page


Related Entries

Member of the PHP Magazine Network, Copyright (C) 2005-2008 phpmagazine.net All Rights Reserved