[ALOY-152] Add an Include and Require element see description
GitHub Issue | n/a |
---|---|
Type | Story |
Priority | High |
Status | Resolved |
Resolution | Fixed |
Resolution Date | 2012-08-07T21:48:05.000+0000 |
Affected Version/s | 2012 Sprint 16 |
Fix Version/s | 2012 Sprint 16, Release 3.0.0 |
Components | Runtime, XML |
Labels | n/a |
Reporter | Russell McMahon |
Assignee | Unknown |
Created | 2012-07-30T23:54:27.000+0000 |
Updated | 2018-03-07T22:26:06.000+0000 |
Description
After having a lengthy discussion with Tony and Rick we may want to support both an Inculde and a Require element as the two elements provide quite disparate featues. Rick or Tony feel free to expand if you think I missed something. index.xmlother suggestions
<!-- for widgets -->
<Require widgetId="widgetId"/>
Comments
- Tony Lukasavage 2012-08-07
Originally from Russell McMahon:
Since both widgets and views will use the Require element we should have a type attribute. If type is missing default to type="view"
/* require brings in trifecto */ - Tony Lukasavage 2012-08-07
OK, but we'll need to use something else for the widget id, since *id* is reserved for Alloy use. How about we use *src* for both cases and let the *type* determine how each should be handled?
option #1
I actually like the idea of doing this initially:<Require type="widget" src="widgetId"/> <Require type="view" src="path/to/view"/>
option #2
but it starts introducing more reserved keywords. It's also not as flexible as using *type* if we ended up adding more types. But... man does it look pretty, clean, and expressive. I don't know, I might be talking myself back into option #2 as I'm typing. Thoughts? Also, as far as<Require widget="widgetId"/> <Require view="path/to/view"/>
, should it just look like this?
An important distinction is that<Include src="path/to/any/xml/file"/> <!-- example --> <Include src="views/myMarkup.xml"/>
will happen at compile time, where will generate runtime code for accessing the generated controllers. - Russell McMahon 2012-08-07 Option #1 looks to be best.