It is important to note that the BS and PM layers can be updated. The only layer that is not changable is the IL that gets deployed to the client.
The following are the layers:
Note that this layer, may run across many different security contexts. For example, in the extension implementation this layer first runs in the contentscript and generates an injectable payload (that will bring in the BS when run) that will run inside the page.
See context detection below.
For direct injection as JS:
https://izyware.com/chrome_extension.js
For example, the app.html page uses it:
https://izyware.com/app.html
For loading through AJAX (comes in handy when implemeting the initial , use:
https://izyware.com/bootstrap1.php
See the following for an example:
https://izyware.com/apploaderwithcache.html
ui/ide/cloudstorage/table will always be available for incremental loading of packages (see below). However most apps use the izyware/pkgman/inline/cloud as the wrapper that also uses the cacheManager. Note that this should be added to as a static dependency to the package.
It is used to 'load' the packages either from the cache or from the cloud and also to ping the backend for any update:
mdotask.ldmod('ui/ide/cloudstorage/table').sp('packagename', 'pkg1+pkg2+...').
This will
make a list of trigger package by scanning the izyware.token_triggers tables to see if there are once and always trigger packages defined for the current idtoken*
- allpackages[0]
- once trigger- always trigger
- idepkg if neededFor each package, the the packagename + deps (from ridep) will form a list of pkgs which will allow the system to construct the string representation of the modules. The system supports taking snapshots of this over time to allow for release versioning and protect against live changes as they would occur to the system.
While caching makes things more complicated, it will have the following benefits:
Only the packages that have release snapshots are cached. The timestamp of the release snapshot is used for cache management purposes.
To Inspect the cache manager, console.log the following:
izywarebootstrapsystemconfig // Overall config including cache contents
izywarecacheManager // The reference implementationSites the specify connect-src CSP will reject cross domain GET/POSTing and script-src CSP will reject JSONP loading of incrementalLoadPkg. Also when in non-browser environments (i.e. circus backend) qry/transport/scrsrc will not work. The transport layer can be overloaded using the __runInBootstrapContext in the cacheManager. See the extension implementation for a reference on how this technique is used to remove network tab littering and work around CSP constrains. The circus backend also uses this technique to overwrite the JSONP transfer method.
Context detection is essentially about figuring out what packages (and dependencies) to load and then what to run.
The deployment engine uses the following order to do context detection:
http://emptyproject.izyware.com/
https://izyware.com/app.html?appid=emptyproject
May be used for:
- https schemes because the subdomain method wont work with https
- specifiying deps using the mod1+mod2+... scheme since '+' wont work in the subdomain schemevar ab = document.createElement('script');
ab.id = 'chromeextensionmodetoolbarid' + APPID(true|false for dbg) + '_' + IDTOKEN;ab.type = 'text/javascript';
ab.async = true;ab.src = ('https:' == document.location.protocol ? 'https://' : 'http://') +
'izyware.com/chrome_extension.js?' + (new Date()).getTime();var s = document.body.firstChild;
s.parentNode.insertBefore(ab, s); ORThis is suitable for injecting into existing context where access or tampering with DOM or the URL is not appropriate. For example, the content script component of browser extensions use this feature to inject into web pages.
The service can handle multiple side by side deployments in the same DOM context. As an example consider the following:
This will cause the deployment service to be launched twice. Each time it is launched it will load one of the contexts.document.izyOnBeforeLoad = function() {}
Inside a running pacakge via importpkgs and ext* mechanism
In contrast, when launched by importpkgs and ext render, all of the above is going to be made avilable to the package.
NOTE: the kernel/storage will be shared in both scenarios. Each instance of the bootstrap system (https://izyware.com/chrome_extension.js) gets its own context and kernel/storage. If you are interested in seperate kernel/storage instances, launch your package via bootstrap. However, the intial loader may or may not share the caching storage across different bootstrap instances.