According to the Curl documentation, OCC enables the end user of your application to store a copy of the application on the local hard disk and access it when not connected to the Web server. The OCC application runs locally in the Curl RTE using the stored Curl source and other application data.
As you know, the local copy of an OCC applet will be updated whenever it's online copy is (if only the applet will be running online), Then there is a question about how an occ applet could run(start up) more efficiently(quickly).
Suppose
I would provide two ways to run this applet.
1. Run this applet just as what the document told me.
2. Run this applet in my own way:
I created an applet used for downloading the car file while not run it's online applet with only two lines(suppose my {applet xxx} declaration is correct):
In this way, an applet will run with the following steps:
in fact there are other merits for the second approach, like only one copy of package caching for this applet will be created, won't break even if the network is down during running this applet when dynamic loading is used.
I'm confused by the current OCC feature because of the above description, any explanation?
Thank you!
As you know, the local copy of an OCC applet will be updated whenever it's online copy is (if only the applet will be running online), Then there is a question about how an occ applet could run(start up) more efficiently(quickly).
Suppose
- a) my network is always online
- b) my applet has updated packages/resources each time before I run it
- c) my Curl Control Panel is set to "force to synchronize all applets" in the General tab(this is case commonly used in Japan).
I would provide two ways to run this applet.
1. Run this applet just as what the document told me.
- that is to say, using the curl://occ/http://www.myserver.com/myapplet.dcurl to run this applet.
- then the following processes will happen:
- (time 1) check update for car file, and download car file and unpack it to curl://occ-local/http://www.myserver.com/
- (time 2) check all the updates for package files/other resources
- (time 3) compile the updated packages
- (time 4) run (the online copy) and show this applet .
2. Run this applet in my own way:
I created an applet used for downloading the car file while not run it's online applet with only two lines(suppose my {applet xxx} declaration is correct):
{do {occ-install-or-update occ-root-installer}} \\ {browse-url {url "curl://occ-local/http://www.myserver.com/myapplet.dcurl" }}This will ensure that I always run the latest application I can access, while locally! Which means, I need not run the online copy at all, I need not take extra time to donwload/update those pcurl/resource files again, which are all already included in the car file.
In this way, an applet will run with the following steps:
- (time 1) check update for car file, download car file and unpack it to curl://occ-local/http://www.myserver.com/
- (time 3) compile the updated packages
- (time 4) run (the local copy) and show this applet.
in fact there are other merits for the second approach, like only one copy of package caching for this applet will be created, won't break even if the network is down during running this applet when dynamic loading is used.
I'm confused by the current OCC feature because of the above description, any explanation?
Thank you!
Tags:
occ,
package-caching,
offline,
update