For whatever is in localStorage not until you needed more up-to-date data or needed to transfer data from the app to more permanent storage (i,e. a server database)
So for your example, estimated quotes could work, and a number of customers’ details, but eventually you would want to be online as the 5 MB won’t last forever.
What is localStorage? Is that some JavaScript thing?
Would PhoneGap do any storing of data?
So, if the owner had Internet connection in the morning, loaded the estimation app on his iPad, and then went out in the field for the entire day estimating, then he wouldn’t need Internet access - assuming he stayed under 5MB - until the end of the day when he uploaded his job estimates, right?
You mention localStorage, but does that also handle storing the web app itself?
He asked me today, “How can your web app work with no Internet?” I told him I believe it could be loaded into memory in the morning as long as he had Internet access then.
So, what happens if his iPad goes to sleep or he loses power? Then all of that data and loaded pages would be toast, right?
Just curious, but if he has an iPad (I’ll assume one bought over the last couple of years), why not use the included ‘Numbers for iOS’ app? That’s more than capable of storing any number of worksheets, which could be printed off later. If he invested in a portable printer with AirPrint built in, he could print something off on the spot.
The thought of a spreadsheet did cross my mind, but…
1.) The calculations required to build an estimate are probably more than a spreadsheet could easily do
2.) I can’t build him an app and bill him $$$ if he does this in a spreadsheet!
You’d be surprised what this actually means from an application perspective. In the enterprise world, there is even an abbreviation for it. It is called. CPQ or Configure, Price and Quote.
Sorry, but nobody is going to want to stand on a job site and balance an iPad in their hands while navigating a spreadsheet.
The whole idea for the web app/app is to be to tap away on a single screen and then have the web app/app do all of the work in the background.
This guy approached me and asked if I could build him an app. Telling him to use a spreadsheet because it is too hard for me to learn how to build a web app/app is what would not build trust with him…
As per my comments above, I think this is way more complicated than a spreadsheet.
“Big, fancy calculator” refers to the UI. That is, a single screen where he can tap, tap, tap and then all of the complexity is removed from his life and done for him in the app.
My advice would be to first de-couple the existing PHP app into back/front end. Wrap the core back-end controllers/models with a simple, authenticated CRUD API, and the front-end into a stand-alone javascript/html5 app. Then you can simply wrap the JS/HTML app with Phonegap and you have your hybrid compiled, installable mobile application. Or you can serve it up as a responsive web app. Or both. Same codebase.
The suggestion previously about using the HTML5 localStorage API is a valid one, but use wisely - don’t try and sync all of your customers, order, history data etc locally and try and run a dynamic, data-heavy app totally offline - use the localStorage to cache current activity/state etc, to help preserve the experience through short internet outages, phone power recycles etc. LocalStorage is stored to disk by the browser.
I have read the thread… the OP talks about synchronising with a server at least at some point in time:
I maintain that this should be done via an API. LocalStorage should be used to store enough data locally/offline to perform the immediate task at hand - creating and saving locally one or more estimates.
… yes these are perfect technologies to use to create an app that can easily be deployed to a web app, or wrapped and compiled into hybrid mobile apps using PhoneGap.
I’m sure there are hundreds of other articles like that out there. I’m convinced that if you need an app you should build an app and not half-@ss it with web technologies and a janky at best “wrapper”.
There isn’t much of a business case to build a native app if a) the client doesn’t have budget to create a dedicated app per device platform, and b) if the app doesn’t use any features that are best served by native technologies. I haven’t seen anything from the OP about targeting only iOS platforms, or needing complex 3D visuals, or…