4 ms·
Thanks! Hmmh, but all I see is WebApp, WebGL, JavaScript, HTML, ... I don't see 'native' -> How would I implement an offline navigation? (which is currently re
by karussell 13y ago
Thanks!
Hmmh, but all I see is WebApp, WebGL, JavaScript, HTML, ... I don't see 'native' -> How would I implement an offline navigation? (which is currently really not possible in JavaScript)
Or is it just not possible to create a resource intensive or tricky application in FireFox OS?
- Yoric 13y agoYou don't need native to develop offline applications. Perhaps this is what you're looking for: https://developer.mozilla.org/en-US/docs/HTML/Using_the_application_cache https://developer.mozilla.org/en-US/docs/HTML/Using_the_appl... If you could provide examples of what you mean by "resource intensive" or "tricky", it might be easier to help you.
- karussell 13y agoHow would you develop an application to do offline routing like my GraphHopper road routing project? Such applications have to use the RAM or disc access provided by the OS. A simple cache will not do it. Although I could imagine that JavaScript is fast enough these days you still need access to lots of memory and load several hundred MB from somewhere/disc
- doublec 13y agoYou could download the routing data into IndexedDB and use that for your file system.
- karussell 13y agoAnd you know how fast that would be? Using an ordinary DB for graph algorithms is already slowish on a powerful server ...
- doublec 13y agoIndexedDB allows direct access to the blobs like a file: https://developer.mozilla.org/en-US/docs/Web/API/FileReader https://developer.mozilla.org/en-US/docs/Web/API/FileReader
- Yoric 13y agoInteresting question. Bulk loading/saving big binary data from/to IndexedDB is basically as fast as accessing the file system. Using TypedArray or (upcoming) BinaryData, JavaScript can also manipulate binary data pretty quickly. I haven't attempted doing any serious graph processing in JavaScript, but these days, JavaScript is extremely fast at tree manipulation (much faster than OCaml, which has long been the fastest high-level language for this kind of thing), so I would imagine that it's quite suited for the task. If you are serious about this, you should come and chat on irc.mozilla.org, channel #openwebapps for instance. We'll be happy to help you get started, plus that kind of discussion is often how new features and optimizations get started.
- csuwldcat 13y ago"How would I implement an offline navigation? (which is currently really not possible in JavaScript)" - wow, just wow. Beyond the fact that this is just plain wrong - there are packaged apps that ship all assets on install, as well as great offline JS libraries - you do realize these things (offline, telephony, etc) are _APIs_ right? No _language_ Just Does™ offline or telephony - for instance, C++ is not somehow magically self-aware of internet connectivity, it's simply a language used by developers to code against device hardware/firmware which then provides _APIs_ for these capabilities. JavaScript is no less capable of supporting these APIs, look at Node.js for instance, it has most of the server _APIs_ you find in other server implementations that use different languages as a base (and the Firefox platform has many of them already, with many more to on the way!)
- karussell 13y agoYes, I was wrong: you can create offline navigation with JS! (sorry, for the incorrectness I really like JS, especially on the server!) But you cannot - please correct me when I'm wrong - create offline navigation on a FireFox OS when using only the provided APIs. At least I don't see a way how it should scale beyond a smallish city.
- Yoric 13y agoI'm not sure I understand where you see a limitation that could block you. See my other reply for a more elaborate discussion :)