[ALOY-610] TiAPI: Read Alloy markup files natively
GitHub Issue | n/a |
---|---|
Type | New Feature |
Priority | n/a |
Status | Closed |
Resolution | Won't Fix |
Resolution Date | 2014-01-20T21:57:01.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | n/a |
Labels | n/a |
Reporter | Shak Hossain |
Assignee | Tony Lukasavage |
Created | 2013-04-06T00:19:27.000+0000 |
Updated | 2014-02-28T23:57:15.000+0000 |
Description
The concept of markup files CAN be good, but I feel that writing markup files just to convert them at compile to JS might make development faster or easier, but does not really provide extra perks. Loading the XML natively would provide load time speed improvements well beyond anything that can be done via JS as it eliminates the bridge.
Here is what I am proposing in JS (Alloy markup should be known by all here, so no need to explain it):
// Returns the root view
var window = Ti.UI.load('/ui/index.xml');
// get a child view by ID
window.find('subview');
I don't see how this solution provides any performance enhancement. It appears to me to push compile time effort into the runtime, which would in effect make the app slower. What exactly is going on in the proposed
Ti.UI.load()
function that would actually make this faster?window.find()
by its very nature would be slower than simply referencing elements directly by id, and if that's what it's doing under the hood, I don't see why we would create a new API to do what Alloy does already. I'm going to close this one for now, but I'll re-open if some of the above points can be made to show a clear and distinct advantage over the current Alloy setup.