Download 1.5.x - Docs

Transcript
qooxdoo Documentation, Release 1.5.1
• Internationalization (I18N) Data This comprises two kinds of data:
– translated strings
– locale information (also CLDR data, such as currency, date and time formats, asf.)
• File Resources
– static files like PNG and GIF graphics, but also HTML and CSS files, sound and multimedia files, asf.
Many of these resources need an internal representation in the qooxdoo app. E.g. translated strings are stored as
key:value pairs of maps, and images are stored with their size and location. All this data requires space that shows up
in sizes of application files, as they are transfered from server to browser.
The build system allows you to tailor where those resources are stored, so you can optimize on your network consumption and memory footprint. Here is an overview:
• source version: - without dedicated I18N parts:all class data is allocated in the loader - with dedicated I18N
parts:class data is in dedicated I18N packages
• build version: - without dedicated I18N parts: class data is allocated in each individual package, corresponding
to the contained class code that needs it - with dedicated I18N parts: class data is in dedicated I18N packages
The term “dedicated I18N parts” refers to the possibility to split translated strings and CLDR data out in separate
parts, one for each language (see packages/i18n-with-boot). Like with other parts, those parts have to be actively
loaded by the application (using qx.io.PartLoader.require).
In the build version without dedicated I18N parts (case 2.1), those class data is stored as is needed by the code of the
package. This may mean that the same data is stored in multiple packages, as e.g. two packages might use the same
image or translated string. This is to ensure optimal independence of packages among each other so they can be loaded
independently, and is resolved at the browser (ie. resource data is stored uniquely in memory).
“cache” Key
Compile cache
The main payload of the cache key is to point to the directory for the compile cache. It is very recommendable to
have a system-wide compile cache directory so cache contents can be shared among different projects and libraries.
Otherwise, the cache has to be rebuilt in each enviornment anew, costing extra time and space.
The default for the cache directory is beneath the system TMP directory. To find out where this actually is either run
generate.py info, or run a build job with the -v command line flag and look for the cache key in the expanded
job definition, or use this snippet.
The compile cache directory can become very large in terms of contained files, and a count of a couple of thousand files
is not unusual. You should take care that your file system is equipped to comply with these demands. Additionally,
disk I/O is regularly high on this directory so a fast, local disk is recommendable. Don’t use a network drive :-) .
“let” Key
Config files let you define simple macros with the let key. The value of a macro can be a string or another JSONpermissible value (map, array, ...). You refer to a macro value in a job definition by using ${<macro_name>}.
"let": {"MyApp" : "demobrowser"}
...
"myjob" : { "environment" : {"qx.application" : "${MyApp}.Application"}}
318
Chapter 9. Tooling