Community
Participate
Working Groups
In a real application, the same UI resource could be used several time. It is more smart to provide a mechanism to load it once and reuse it as needed to avoid the file loading and XML parsing each time. The solution is to create a new type to keep the parsing result. And the we can use this element to create the UI when we need it.
Next step, it is possible to serialize this object (let's say binary resource) in a file, which can be loaded directly by light weight runtime without XML bundle dependency.
A new type IUIPattern is added to hold the in memory data after the XML parsing. Some methods are introudcued in XWT to create such object via UI resource: XWT.loadAsPattern(URL, ...); Once IUIPattern is created, we can use it to create UI same as URL. The implementation is committed -> 20100831.
"Pattern" may not be a appropriate name. It is not template either. I propose Mold. I know it is not a common software term. It is the term of Art and Sculpture.