[Qt-qml] Using HTML5 Storage&Application Cache with Exhibit&QtWebKit (was Re: [Simile-Widgets] Re: Announcing Exhibit 3.0)
Niels Mayer
nielsmayer at gmail.com
Fri Jan 21 07:48:56 CET 2011
Regarding http://www.simile-widgets.org/exhibit3 , On Fri, Jan 14,
2011 at 4:29 PM, mleden wrote:
> 2. I love the idea of a remote/local hosting option for the SIMILE
> resources. Could I suggest that you even explore having an Exhibit
> end-user option (cookie perhaps?) to govern that?
Perhaps there need be no distinction between these options, by using
HTML5 offline storage implementation?
For using Exhibit in a mobile context, I was wondering whether HTML5
offline storage is being considered, as it appears well supported at
least in Chrome/Safari/WebKit, and promises to allow the construction
of portable apps in MeeGo, Maemo, Symbian, Android, WebOS, and iOS:
see
http://caniuse.com/#search=offline http://www.w3.org/TR/offline-webapps/
http://www.whatwg.org/specs/web-apps/current-work/#offline
http://hacks.mozilla.org/2010/01/offline-web-applications/ ...
Watching the Google Tech Talk on "HTML5 Storage: Application Cache"
(January 5, 2011, presented by Nikolas Coukouma):
http://www.youtube.com/watch?v=CoUSIBep1G8 ...
made me wonder whether this technique has been used for offline/cached
use of Exhibit-based GUIs. Implement by listing all the Exhibit
JavaScript and CSS resources in a cache manifest (
https://developer.mozilla.org/En/Offline_resources_in_Firefox#The_cache_manifest
) such that they subsume the current browser caching mechanism and
allow transparent offline use of the files loaded by Exhibit:
http://code.google.com/p/simile-widgets/source/browse/exhibit/trunk/src/webapp/api/exhibit-api.js
. Perhaps the offline javascript API (
http://www.whatwg.org/specs/web-apps/current-work/#appcacheevents
https://developer.mozilla.org/en/Online_and_offline_events ) can
transparently extend the loading mechanisms used by exhibit-api.js to
work both offline, or on, using the same code?
This would be particularly useful for handset/netbook and other mobile
usage, which would download a bundle of exhibit resources into the
cache on initial site authentication or load. Such an implementation
may also offer better performance due to potential sharing of these
resources among different Exhibit based applications. All while
ensuring a cached and up-to-date version of Exhibit's JavaScript
infrastructure is immediately available to any pages independent of
online/offline state. Finally, a hybrid QtWebKit implementation may
be a good way to work-around using Exhibit in a handset browser such
as Firefox Fennec, where some of the 'mouse drag' gestures used in
the Timeline or Timeplot widgetry would instead drag the whole browser
page around within its scrolling-pane; furthermore, support for
touch-based gestures, such as "long touch" popping a context sensitive
menu, could be added into the QtWebKit "wrapper" without needing
special touch-gesture modifications to the existing Exhibit code.
...
Background and further details:
I hope to integrate some of my former still-to-be-finished Exhibit (*)
work with Qt-based "Hybrid Web Applications" in the hope of using
Exhibit GUIs on any handset/netbook/desktop supporting Qt and
QtWebKit. For mobile-targetted usage, such an implementation has
potential portability to MeeGo, Symbian, Maemo as well as Android and
WebOS, and in the future, iOS.
For further information on "Hybrid Web Applications" with QtWebKit, see:
http://wiki.forum.nokia.com/index.php/Google_Chart_Integration_to_Qt_Using_Google_API_and_QtWebKit
http://doc.qt.nokia.com/4.7/qtwebkit-bridge.html
http://doc.trolltech.com/4.6/webintegration.html
Finally, as a longer-term interest, I believe that Exhibit-based
interfaces running in a nicely wrappered QtWebKit view would be an
excellent match to http://en.wikipedia.org/wiki/QML : "(Qt
Meta-Object Language) [...] JavaScript-based, declarative language for
designing user interface centric applications." IMHO, it would be a
powerful combination to combine QML's declarative data "models" (
http://doc.qt.nokia.com/4.7/qdeclarativemodels.html ) with Exhibit's
rich "views" and the ability to mashup map data and other web widgetry
with these views: http://www.simile-widgets.org/exhibit/
( For more info on QML see
http://code.google.com/p/ytd-meego/wiki/CitizenJournalismWithYoutubeDirectForMeego#GUI_Technology:_Qt_Quick_and_QML
).
-- Niels
http://nielsmayer.com
(*): Snapshots of said to-be-completed-as-hybrid-QtWebKit app using
Exhibit, in lame prototype "desktop" configuration and using
problematic/slow/inefficient/unportable flash playback for
audio/video:
http://nielsmayer.com/ts-episode-timeline.png
http://nielsmayer.com/ts-episode-evnt-anls.png
http://nielsmayer.com/trainspodder-prototype.jpg
More information about the Qt-qml
mailing list