Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 324085 - In-memory reusable UI resource
Summary: In-memory reusable UI resource
Status: CLOSED FIXED
Alias: None
Product: XWT
Classification: Technology
Component: Core (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-08-31 09:08 EDT by Yves YANG CLA
Modified: 2013-01-24 15:31 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Yves YANG CLA 2010-08-31 09:08:08 EDT
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.
Comment 1 Yves YANG CLA 2010-08-31 09:11:28 EDT
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.
Comment 2 Yves YANG CLA 2010-08-31 10:35:05 EDT
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.
Comment 3 Yves YANG CLA 2010-08-31 18:20:40 EDT
"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.