1

I have to design an webapp that has the capability of working offline.

So there are many working points that in normal mode work online , connected to a central server.

Now there are moments when for different reasons , the central server might not be available. (no internet ,server crash etc) so then is needed to enter in offline work mode. Is not required to work fully just to do some work because clients should not wait , so invoicing should be possible (concrete case).

A custom solution I already have in mind but I am wondering if you know a framework or something that does such things already.

Thank you !

ahmet alp balkan
  • 42,679
  • 38
  • 138
  • 214
Cris
  • 4,947
  • 6
  • 44
  • 73

3 Answers3

2

We wrote a desktop app for hundreds of employees to use on their laptops. It used database replication to merge the data from the laptop copy of the database to the server copy of the database. The amount of data contained in the database was significant -- product information, customer contact information, and so on. That was all needed for the rep to be able to create sales orders and invoices and the like. It was crucial that the rep be able to use the software all the time, not just once in a while when they had connectivity. However, this approach does have its challenges -- if the local databases don't get synched up frequently, data at both ends becomes stale, plus you have to deal with conflicing updates.

If the amount of database information needed locally for working disconnected isn't huge, you definitely can take advantage of the new HTML5 offline storage and use a website.

I think that the critical factors here are how much data the user needs when they are working offline, how fresh the data needs to be, and what percentage of time they will be working online vs. offline.

DOK
  • 32,337
  • 7
  • 60
  • 92
  • Yes ..quite a lot..that is why i question if html5 is suited for that.It is about invoicing.so more then 10000 cleints,10000 products...+ the generation of the pdf invoice...What DB did you used ? replication was working fine...? – Cris Jun 04 '11 at 17:31
  • 1
    We were using SQL Server. Replication worked fine. The reps loved the mobility. It is so embarrassing to be sitting there with a customer and your dang laptop can't connect to the internet. If you want to research this, you might compose a very specific new question describing the amount of data, etc, and asking for people's advice on the best databases to use for replication. Before you do that, though, check out other SO questions like [this one](http://stackoverflow.com/questions/142068/which-database-has-the-best-support-for-replication). – DOK Jun 04 '11 at 17:45
  • you can use html5 and replicate to localstorage, or something like couch db – hvgotcodes Jun 05 '11 at 14:17
1

If your app is html/javascript, use the HTML5 application manifest. See the following resources

http://www.w3.org/TR/offline-webapps/ http://www.webreference.com/authoring/languages/html/HTML5-Application-Caching/

hvgotcodes
  • 118,147
  • 33
  • 203
  • 236
  • Well is this suitable for storing 10000 clients in that sort of cache? The main idea behind this app is simple invoicing.Normally you get data from server: clients ,prices ,products etc...In offline all this should be retrived from ? local db ? or .... – Cris Jun 04 '11 at 17:24
  • each client is its own application and manages its own offline state – hvgotcodes Jun 04 '11 at 17:44
1

You can use Google Gears.

Here is another link: http://www.scriptol.com/ajax/google-gears.php

Marcelo
  • 11,218
  • 1
  • 37
  • 51