[TIMOB-9658] BlackBerry: Add JavaScript bootstrapping to framework
GitHub Issue | n/a |
---|---|
Type | New Feature |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2012-07-06T08:31:35.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Sprint 2012-09 BB, BB Preview 3 |
Components | BlackBerry |
Labels | parent |
Reporter | David Lifshitz |
Assignee | David Lifshitz |
Created | 2012-06-20T08:37:26.000+0000 |
Updated | 2017-03-08T17:33:04.000+0000 |
Description
Some of the Titanium implementation can be done using JavaScript so we need to provide a way to run our own bootstrapping .js files before we load app.js. There is possibly a lot of JavaScript code we can reuse from the android directory.
The method I suggest is to package the .js files into the .bar file. The files should be put into a new folder called "framework" that is next to, not inside, the "assets" folder. The "assets" and "framework" folders should be separate so we don't have conflicts. The only complication would be that the require() and include() functions might need a flag to know whether the app has been bootstrapped or not (ie read from "framework" if bootstrapping and "assets" if not). A flag may not be sufficient if things are done asynchronously so the other solution would be to check if the file calling the require/include is in "framework" or "assets" and make sure to load the file from the same directory.
There should be one file called boostrap.js that will include/require the other files, as needed.
Closing ticket as resolved.