When I have internet aware Rev Apps that load many images dynamically from the internet, the following might be a good strategy to reduce server round trips:
- Bundle images in ZIP archives on the server-side
- Send the ZIP archives to the client-side (desktop or browser) via internet
- Unpack those images from the ZIP archive on the client-side
I'm aware of solutions implementing this strategy for Flash and Silverlight; a more general treatment proposal for this strategy came to my attention just recently:
- http://ajaxian.com/archives/resource-pa ... -packaging
Now I would like to know: What has RunRev 4.0 in store for realizing this ZIP resource bundling strategy ? That is are there approaches for unpacking ZIPs on the client-side (desktop AND web) ? And making those unpacked resources - e.g. lots of images - available to the deployed apps dynamically ?
Fetching images bundled in ZIP archives dynamically
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
- VIP Livecode Opensource Backer
- Posts: 977
- Joined: Sat Apr 08, 2006 7:47 am
- Contact:
Well, there is the built-in revZip external for working with .zip archives. So yes, you can download the .zip archive from your server, put it somewhere on the hard disk and then extract items from it.
The only 'but' for web browser revlets, is that downloading to a local file or accessing a local file for processing means the revWeb plug-in must specifically ask the user to enable disk access, which will make most people frown.
Jan Schenkel.
The only 'but' for web browser revlets, is that downloading to a local file or accessing a local file for processing means the revWeb plug-in must specifically ask the user to enable disk access, which will make most people frown.
Jan Schenkel.
Quartam Reports & PDF Library for LiveCode
www.quartam.com
www.quartam.com
Thanks for the answer
! Heard of revZip before, but have never used it ...
Now if there was only a way to pump those locally stored resource files into the browser caches ... Because in web-based apps, those resource/image files are assumed to reside within the browser-caches when having been fetched.
No idea how internet-aware RunRev apps handle the resource/image locations:
- Desktop-based: Location is somewhere on the local hard disk
- Browser-based: Location is in the browser-caches
Is that assumption correct ?

Now if there was only a way to pump those locally stored resource files into the browser caches ... Because in web-based apps, those resource/image files are assumed to reside within the browser-caches when having been fetched.
No idea how internet-aware RunRev apps handle the resource/image locations:
- Desktop-based: Location is somewhere on the local hard disk
- Browser-based: Location is in the browser-caches
Is that assumption correct ?
-
- VIP Livecode Opensource Backer
- Posts: 977
- Joined: Sat Apr 08, 2006 7:47 am
- Contact:
The difference between a revlet and an AJAX solutions, is that the AJAX solution is run inside the browser, and revlets are actually run outside the browser, and merely the user interface is displayed inside the web page.
It never hurts to file an enhancement request in the Quality Control Center to ask for access to the browser cache.
Jan Schenkel.
It never hurts to file an enhancement request in the Quality Control Center to ask for access to the browser cache.
Jan Schenkel.
Quartam Reports & PDF Library for LiveCode
www.quartam.com
www.quartam.com
Re: Fetching images bundled in ZIP archives dynamically
Create stacks with custom properties, which contain (sets of) pictures.
go to url "binfile:http://www.domain.com/path/stack.rev"
set the text of img x to the cJpegFileData of stack "My Stack"
or
set the text of img x to decompress(the cPngFileData) of stack "My Stack"
and finally
delete stack "My Stack"
Best,
Mark
go to url "binfile:http://www.domain.com/path/stack.rev"
set the text of img x to the cJpegFileData of stack "My Stack"
or
set the text of img x to decompress(the cPngFileData) of stack "My Stack"
and finally
delete stack "My Stack"
Best,
Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode