I’ve had a feedback case open for a while now, It’s about having the ability to create Progressive Web Applications (with service worker) to have an offline capability in Xojo Web (2.0) applications and allow them to be installable (on your iOS, Android, MacOS or Windows desktop !).
Currently it’s not directly possible in Xojo Web 2.0 but since it’s launched this would be a great feature. Having a simple “install to desktop” (for desktop) or “install on home screen” (for apps) would mean, no code signing, no developer costs other than xojo license, the same app for ALL platforms and Web App offline use ability (could be limited).
Considering Xojo compiles down to LLVM and LLVM can run as WebAssembly in the browser. It doesn’t seem beyond the reach of Xojo but my guess is its pretty far off on the priority list. Might have to be a different offering than the current Web2.0 as well as many things would change.
Do you understand that these three items are not equal? Sure, the manifest and the cached items are easy, but the service worker is not.
This list is like someone saying “I want to make a car! All we have to do is 1. Draw a picture of it, 2. Build it, 3. Show it to our friends.”
Nothing more tha a offline-only webpage* would be enough for most solutions.
The service worker does only cache the offline page in this case.
Modification is possible.
WebPage that has no server side implementation. The only thing it would do is send html to the browser that can be cached and does offline to online once the server is up. Currently we get a message box showing there is no connection to the server…
This is the easiest implementation to get “install to desktop and/or homescreen”
You seem to look too far, it’s actually pretty do-able by using app.handleUrl but it’s not “simple” xojo could make this “simple”
While I fully believe this is where Xojo Web needs to go, it would require a fundamental redesign of just about everting Xojo Web is.
You say you just want a simple offline-only page, and you’re right that would be simpler than a true PWA. But then the next person wants it just a little bit more functional. And the next person after that. You might thing it’s serve as a stepping stone, but you’d be wrong since (like I said) true PWA support would require just about everything to change.
I don’t a partial implementation is in Xojo’s interests.
You should not request anything directly to the file system, or web; any resource must be requested to cache engine (service worker) that needs to change from offline/online at the correct time or you will have a thing half done, and that engine must take care of everything, including get/post/cookies… It will take many efforts that’s too many months away from now that I don’t see it happening anytime soon. But in the future, for sure.
The service worker is not required to do ALL communication only required to handle the cache if i’m correct.
In my latest test all normal functionality works out of the box on al pwa supported platforms. The service worker i used is one that does handle a offline.html file from here: https://www.pwabuilder.com/
The only thing i actually like is having a desktop application in a single “install mywebapp” to macos or windows 10 (and or ios, android).
I’m just looking if there is more interest.
Sure everyone wants this than that etc… that’s always the case…
Are you aware that such “desktop app” has no such powers as a traditional desktop have, aren’t you? It “lives” in a sandbox. A PWA currently is no substitute for any native app using “close to the metal” resources. This technology is so new that most things still being done yet. For example, until recently we could not have access to the file system, now there’s a draft of an integrated API, and Chrome does it, not all the rest can do it (currently). NFC is the new of the newest, only newer versions of Chrome for Android can do it (AFAIK). Let’s wait it to mature a bit more.
Not without internet it cannot. Part of the job of the code is to fall back in some way, and that’s entirely application-specific. Maybe the app can’t work at all without internet, so you’d basically just get a placeholder view.
It has a DB Engine for offline handling. IndexDB API 3 is the current draft for Chrome. If you can design something caching database content and using the local copy, that’s ONE of the infinite possibilities the designer of the app/engines involved could go for.
From what I read, it uses a local database. You’d design your app so it can do just a few things off line like read data, maybe add data like surveys and inpection type apps. You’d download what you need to do in the field, work, then upload it back.
I might have this all wrong, but I think that’s the point.
It’s not about offline. While offline is possible it’s not a requirement.
Web App manifest spec:
It’s more than that.
apps can get hardware access (more than online)
apps can get (.apk for android, .app for macos, exe for windows etc in a single click) binary where the app in included and made stand alone, no code signing required etc… (no additional costs)
nice icon, name etc
It’s fairly easy to have an online xojo web app getting the to stand alone, professional look. A simple offline page isn’t even required. The worker can be registered but doing nothing (or cache as much as it can for example images).
I’m not requesting xojo to make xojo web completely offline that’s a immense task. I’m just interested in a “install” to stand alone feature. That gives assess possibilities to the hardware (more parts of it).
Xojo web already has localstorage in use i believe.