Click here to Skip to main content
15,667,370 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
I have developed web application for restaurant. Its Front office is developed for iPad and back office maintain .net web application . SQL Server 2008 is used as database.

I want to make offline application for Front office which can be used when unable to connect network / DB Server using iPad.
In app i have Masters like Menu master,item master,submenu master etc. and transaction
pages like insert/update item,subitem,order,invoice etc.

Master table's data cannot be Modified but, there should be latest data of master table to transaction in other pages.

In offline mode Fron office using ipad should be working on transaction modules.
and whenever system is connected to internet all offline transaction changes should synchronize with online data

It will be better if can suggest me solution without installing sql at client I have think to use save data xml/json files as per table structure but its not preferable with large numbers of tables and clients and also security issue is there

Please guide me on this. Any help would be appreciated

Thanks in advance
Posted

1 solution

Hi,

Working on the assumption the Front Office is also a web application designed for the iPad you need to look at a HTML5 features supported by Safari within iOS called Cache Manifest and WebSQL.

Cache manifest will instruct the iPad to download all the website components required to operate in an offline capacity. Once it's finished loading for the first time you can put the device in aeroplane mode and the website will still works.

You can the use WebSQL as local storage. This is an in browser implementation of SQL Lite which can be used to store information within the client for recall at a later date.

Web SQL
HTML5 - Web SQL Database[^]

Cache Manifest
A beginner's guide to using the application cache[^]

Other points to consider are that the approach needed for a cache manifest application to that of a tradition web application are very different. With an offline web application you can't rely on the ASP.Net framework for doing most of the work. Data driven content creation must be done using JavaScript. With server side communication done via AJAX. Alot of the Chrome apps work in this way. The applications are written in HTML and JavaScript. The content is downloaded and cached when it is first loaded. It is then available offline. WebSQL is used for local storage, AJAX is used for server communications with error handling to manage when offline.
 
Share this answer
 
Comments
Super Tango 8-Sep-12 19:07pm    
Hi Stephen!
I'm developing too a Front Office web app and i have the same problem.
My web app have many pages (and related images, css etc.) and my question is: how write cache manifest to instruct tablets to download ALL files?
I'm thinking to create only one manifest file called by default page (that is the first page the user navigate) listing not only default related file but all files.
Is the right way or do you have another idea?

Best Regards

Simone
Stephen Hewison 12-Sep-12 3:43am    
Yes that works, if you add multiple html files and all the resources to the manifest you can navigate between multiple pages without having to go to the server.

In the end I buildt a loader which works as a reusable application wrapper. The Wrapper uses ajax to get the application content. I then used web SQL to store the actual application content.

So the wrapper checks if it's online, if it is it gets the current application version, if it's newer it downloads and updates the content. If it's offline or there is no new content it loads the application from web SQL.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900