[...]
>> AFAICS , zipapp is mainly about three aspects
>>
>> 1. Bundling i.e. multiple files in a single archive
>> 2. (De)compression , with little impact upon performance
>> 3. Command-line execution
>>
>> All these are fine in the desktop environment . I have the following
>> answers
oops ! «questions» :P
>> regarding browser-oriented implementations like Brython :
>>
>> 1.1 Do we need anything beyond packaging and loading .vfs.js files ?
> zipapp is a Python standard way of packing applications. .vfs.js files
> is Brython specific.
... but , unless I get some strong reasons, *right now* *I* do not
consider it suitable for the particular use-case of Brython loading
modules over HTTP . The only benefit I see is related to
interoperability concerns , which IMO should not be a priority atm .
>> 2.1 Is it a good idea to deal with data compression explicitly ?
since there is no answer to this topic , I'll clarify what I mean :
Considering performance , is it a good idea for the browser to run JS
code to explicitly execute data compression in the client side ?
>> 2.2 Isn't it better to rely upon built-in HTTP data compression [1]_ ?
> zipapp compresses more efficiently since all files in package are
> compressed all together, not one at a time.
This is exactly what happens if a .vfs.js file containing multiple
packages is downloaded over compressed HTTP streams . I still do not
think zipapp will be quite better .
>> 3.1 Use cases for "command-line" execution (or an equivalent
>> abstraction) when it comes to web browsers rendering web pages ?
> No need for a special syntax : <script type="text/python"
> src="test.pyz"></script>
I do not understand this aspect . How would you achieve this using
zipapp *only* ? I mean why not just zipimport [2]_ , which a more
"curated" solution available since early 2.x ?
> The full app is in the package which is loaded using one http request.
> When importing a module, no more http request, files are already in the
> browser.
This is exactly what happens in aforementioned scenario .vfs.js + HTTP
compression
> No need for a special tool for creating .vfs files.
Agreed , but IMHO all other performance issues are far more important
. The tooling may be improved with time .
> No need for a special Brython distribution.
There will always be a transformed copy of CPython stdlib , if that's
what you mean , since there are significant differences with respect
to Brython e.g. no file-system, SOP, ...
> This can also serve as some sort of code obfuscation some people request.
Good point
Yes , yes , it's cool . I just do not think it's worth the effort ,
even if it will work in the end . Besides the command-line executable
capabilities of zipapp , which is what makes the difference with
respect to e.g. zipimport, I honestly do not see how they fit for
adoption by Brython .
.. [2]
https://docs.python.org/2/library/zipimport.html
[...]