Thanks for your reply on disconnected workflows in mobile.
Disconnected workflow works in web browser in Mobile nice as you said ,but while using web view in Mobile it is possible cache.
My requirement is only one time user need to download the design to view the downloaded design at offline viewer when he wants or when he don’t have internet signal he can able to view the pervious downloaded design.
For the above requirement we can achieve from Disconnected workflows? Or any other suggestion to mobile offline viewer
The "disconnected workflow" approach (using Service Workers and Cache API; see the blog post, sample code, or the live demo) supports this workflow. In the sample application you can cache a model by clicking the star icon next to it, and after the model has been cached, you can access it any time, even when disconnected from the internet.
Downloading the viewable files (SVF) from Forge and serving them yourself is not officially supported. The only exception is when customers are not allowed to store their data in the cloud, for example, due to government regulations. In that case we encourage you to talk to us (forge (dot) help (at) autodesk (dot) com), and we'll see what we could do.
Related
In our app, it's quite common that a user would look at a 3d model, navigates to some other place, and come back to the model.
When the user navigates away, I'm destroying the viewer as recommended in this question
Every time the user wants to come back to the model, it seems that the viewer tries to re-download it and then display it.
It takes 10-15s to load the model with a good internet connection. However, since everything should have already been download, is there a way avoid making these requests and load the model directly from the browser cache?
I've recently published a blog post on leveraging service workers and new cache APIs to cache Forge content locally: https://forge.autodesk.com/blog/disconnected-workflows.
I have a given Javascript browser application with login screen and data display screen. It does request JSON data via calls that are always the same (i.e. http://myserver.lol/api/getData?mobile), the data changing only slightly over time.
What I want is a mobile app for Android/iOS/Windows Phone/Blackberry, which
-> at best "caches" the whole web site (html/js...) in the app, so I don't have to rebuild the app whenever the web app changes;
-> provides some form of "auto-login"/"auto-form-fill", so the user does not have to give his credentials every time, and
-> some kind of long-term cache for the JSON data, so it is requested from server when a fast network connection (LTE/WLAN) is available, but taken from Cache on GSM or without connection.
Which Framework would allow to implement this the easiest? I am just now looking at the PhoneGap docs and the Titanium docs, but I guess I am overlooking something, or don't they provide an easy solution for this? Or perhaps you have an insider tip for me on another framework?
You can definitely handle this buy using both frameworks. I use only Phonegap / Cordova.
I would do this all by building the application with Phonegap together with AngularJS.
You can use templates in there, so you don't have to fetch the Ui from your server.
To cache data (user credentials or JSON data) I would just use the localStorage which is available on all devices (see here).
I recommend angularJS because it is a really great framework which helps you build Web-Applications really fast (but if you already have an existing application this might not be an option for you).
I hope this helps ;-)
So this is more of a general question about apps and techniques rather than a specific code question...
When developing an larger app, how would a developer access lots of data from a website. The example I'll use is an app like Yelp. They have both a web-access site and an app, both share the same information. I would imagine that information like that is stored on the website via some sort of MySQL database and the iOS device access's it as needed based on the user's requests.
How might a developer writing an app start something like this? I assume you need to somehow securely tie the MySQL database to iOS and so on. I've seen a lot of techniques on the web, but they all seem very simple and not safe for a large scale app.
Any ideas would be awesome!
The key term you're looking for is "API" (Application Programming Interface).
A Yelp iOS app won't access Yelp's databases directly. There will be a layer (I simplify here somewhat) between that and the iOS app; this layer will provide a series of methods (the API) by which clients can make queries and potentially manipulate remote state.
A common API format is JSON over HTTP, and indeed, this is what the official Yelp API seems to be.
Good starting points would be the documentation for NSURLConnection and NSJSONSerialization, and the Yelp API documentation I link above.
I'm teaching myself web development, and am working on a small and free web-app on the Chrome web store written in HTML and JavaScript. I'm trying to keep the app entirely client-side since I don't really want to pay a monthly fee for a web hosting service at this time. The app relies on localStorage for saving bits of text. I urge the user to back it up with copy/paste, but this is sort of a crude workaround.
Does anyone know how I might provide an interface for file management that involves only the user's hard drive or some sort of free file transfer service? Could an embedded Java applet do this? I basically want the functionality of the File API, apparently not yet implemented in Chrome (http://www.html5rocks.com/tutorials/offline/whats-offline/).
Nevermind--File API is implemented in Chrome. See http://www.html5rocks.com/tutorials/file/filesystem/ for a tutorial.
Is it possible to build an application inside in browser? An application means:
1 Where there is connection (online mode) between the browser and an remote application server:
the application runs in typical web-based mode
the application stores necessary data in offline storage, to be used in offline mode (2)
the application sync/push data (captured during offline mode) back to the server when it is resumed from offline mode back to online mode
2 Where there is no connection (offline mode) between the browser and an remote application server:
the application will still run (javascript?)
the application will present data (which is stored offline) to user
the application can accept input from user (and store/append in offline storage)
Is this possible? If the answer is a yes, is there any (Ruby/Python/PHP) framework being built?
Thanks
Yes, that is possible.
You need to write the application in Javascript, and detect somehow whether the browser is in offline mode (simplest is to poll a server once in a while). (Edit: see comments for a better way to detect offline mode)
Make sure that your application consists of only static HTML, Js and CSS files (or set the caching policy manually in your script so that your browser will remember them in offline mode). Updates to the page are done through JS DOM manipulation, not through the server (a framework such as ExtJS http://www.extjs.com will help you here)
For storage, use a module such as PersistJS ( http://github.com/jeremydurham/persist-js ), which uses the local storage of the browser to keep track of data. When connection is restored, synchronize with the server.
You need to pre-cache images and other assets used, otherwse they will be unavailable in offline mode if you didn't use them before.
Again: the bulk of your app needs to be in javascript, a PHP/Ruby/Python framework will help you little if the server is unreachable. The server is probably kept as simple as possible, a REST-like AJAX API to store and load data.
The "Let's Take This Offline" chapter in Mark Pilgrim's (online) book Dive Into HTML5 is a very nice overview of writing offline web apps with HTML5 technologies.
Note: Since Mark Pilgrim's original Dive Into HTML5 link seems to be down.
Copies can now be found here among other places.
Jake Archibald wrote "The offline cookbook". A modern (9 December 2014) and nice approach with ServiceWorker:
http://jakearchibald.com/2014/offline-cookbook/
The answer in 2018 is to leverage the service worker, and to build a Progressive Web App:
https://developers.google.com/web/progressive-web-apps/
i was looking for this also, i found out abt HTML5 Offline Web Apps. havent tried it tho
Users of typical online Web applications are only able to use the applications while they have a connection to the Internet. When they go offline, they can no longer check their e-mail, browse their calendar appointments, or prepare presentations with their online tools. Meanwhile, native applications provide those features: e-mail clients cache folders locally, calendars store their events locally, presentation packages store their data files locally.
Have a look at Google Gears, http://code.google.com/apis/gears/. Although they have been phased out in favour of HTML5. However, it seems that what is being pushed as HTML5 is Google Gears.