23. 99% same as CommonJS API
No ugly user pre-defined template wrapper
Monday, September 19, 11
24. what about the file
loading problem?
You haven’t
mentioned it ..
Monday, September 19, 11
25. There is two loading rules in PyJS.
One in local debugging,
the other in online building.
All need Python environment.
Monday, September 19, 11
26. Local debugging
python pyjs.py runserver
Fetch the JS file in synchronous XHR request.
Server will parse the module file automaticly
Monday, September 19, 11
28. Online building
python pyjs.py
Automaticly generate a ‘boot.js’ file, find all the
dependences in modules and add the
information to the end of boot.js file.
Monday, September 19, 11
29. Then , if we had a combo service like:
Monday, September 19, 11
30. We can download the
file just in one
request!
Monday, September 19, 11
31. Finally , because of the require function used on
page has a callback, it can runs after all the files
is received and finish excuting.
Monday, September 19, 11