Thursday, September 27th, 2007
Vortex: A new offline abstraction on top of Google Gears
<p>Brian Dunnington liked what he saw with the Dojo Offline Toolkit, and wanted to abstract it out so you could use functionality with any JavaScript library.He ended up with a new library called Vortex, a 10k JavaScript file that features:
- Ability to automatically detect referenced resources such as images, scripts, and stylesheets (including nested @imported stylesheets)
- Automatic detection of network state with corresponding UI/feature changes (also implements .isOnline() and .isOffline() methods)
- Auto syncing of events. it essentially records any user-defined actions and automatically plays them back when the network comes back online
- A generic storage provider to quickly and easily save javascript objects (JSON-encoded)
- Graceful fallback if no offline support is available (google gears not installed or not allowed to run)
- Library-independent (does not require dojo, prototype, Ext, YUI, etc) and cross-browser compatible
He has a simple RSS demo that shows the library at work.
I took it for a spin and went online and offline to see how it automatically detects. Also in the video below I take a peek at the code and we see what the definition of “online” means (able to XHR a particular file).
Related Content:











It’s great to see that this functionality is now available for reuse in other ajax frameworks. I couldn’t find a license though: if it has the same licenses as Dojo, it should be easy for other libraries to integrate this functionality. That makes it even easier for developers to use it.
the license is BSD-style: essentially, you can do whatever you would like the with code or source. this is my first time releasing a publicly-available library like this and since it is version 0.1, i didnt even think about the licensing aspect. the whole purpose of the the library is to hopefully make it easier for people to build offline applications in any way they see fit, not worry about restrictive licensing issues.
hope that helps – i will update the code with a proper statement as well.
Brian, this looks awesome. Good work making this toolkit-agnostic.
Best,
Brad Neuberg
Thanks Brian, I will definitely try it in my future project(s).
for anybody that was concerned about the licensing – i have added the official verbiage to make sure the code is licensed under a BSD-style license. you can download the updated js files (with license text) from here
I still prefer AJAX. Anyway great job.