

Ask HN: Making an application work offline - raju

I have been in talks with a prospective client about writing an application. Its a simple CRUD application, with a requirement that it needs to go offline (the client's business is a mobile one, and one that involves auditing equipment. They occasionally find themselves in underground basements or buildings that may potentially block off internet access).<p>I have considered several options the two primary ones being Gears On Rails [http://code.google.com/p/gearsonrails/] or Adobe AIR.<p>I was wondering if anyone here has had any experience writing such applications, and if there was any advice to be given. I am open to considerations for other technologies, but I am not sure what those would be.<p>I will admit, I am not sure if this is a question for HN, but I hope it is.<p>Many thanks in advance.
======
bensummers
Check out HTML5's offline features:

<http://www.w3.org/TR/offline-webapps/>

While it's not fully implemented anywhere, Safari and Firefox implement some
useful bits.

It also has the bonus that your offline code can work on the iPhone and
Android.

~~~
mbrubeck
It gets complicated if you want to support multiple browsers. The current
Android browser does not have the HTML5 Database or Offline Applications APIs
enabled, but it does have Gears built in. Firefox 3.5 supports HTML5 offline
apps but not database storage. Gears is available as a Firefox extension. IE8
supports HTML5 key-value storage but not HTML5 database storage or offline
applications. Gears is available as a plugin for IE. Safari for Mac supports
both Gears and large parts of HTML5. Safari for iPhone supports HTML5 but not
Gears.

Take a look at: <http://code.google.com/p/webstorageportabilitylayer/>

This is the database access layer that Google wrote for GMail mobile. It works
with both Gears and HTML5, so you can use SQLite on IE, Firefox (including
pre-3.5 versions), Safari, Chrome, iPhone, and Android. However, it provides
only a low-level (raw SQL) API and is asynchronous for performance reasons.
You'll have to write a bit more code than if you use a high-level Gears-only
library like ActiveJS.

Clearly things are simpler if you can choose either Gears or HTML5, and
support just one or two browsers. Some features are more widely supported
using Gears right now, but this will probably tilt the other direction soon.
For example, the Chromium developers have no plans to add Gears support on
Linux, because they see HTML5 as the way forward.

