{ "id": "155825", "key": "ALOY-1371", "fields": { "issuetype": { "id": "7", "description": "gh.issue.story.desc", "name": "Story", "subtask": false }, "project": { "id": "11113", "key": "ALOY", "name": "Alloy", "projectCategory": { "id": "10400", "description": "Tools for developing applications", "name": "Tooling" } }, "fixVersions": [], "resolution": null, "resolutiondate": null, "created": "2016-03-18T12:51:15.000+0000", "priority": { "name": "None", "id": "6" }, "labels": [], "versions": [], "issuelinks": [ { "id": "51093", "type": { "id": "10011", "name": "Includes", "inward": "is included by", "outward": "includes" }, "outwardIssue": { "id": "155228", "key": "ALOY-1363", "fields": { "summary": "Add support to set object properties via XML", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "priority": { "name": "Critical", "id": "1" }, "issuetype": { "id": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "subtask": false } } } } ], "assignee": { "name": "batman", "key": "batman", "displayName": "Bruce Wayne", "active": true, "timeZone": "America/New_York" }, "updated": "2016-03-18T14:07:08.000+0000", "status": { "description": "The issue is open and ready for the assignee to start work on it.", "name": "Open", "id": "1", "statusCategory": { "id": 2, "key": "new", "colorName": "blue-gray", "name": "To Do" } }, "components": [ { "id": "12326", "name": "XML", "description": "View XML and parsing" } ], "description": "ALOY-1363 got me thinking it would be good to make Alloy less dependent on knowledge about the Titanium APIs for parsing XML.\r\n\r\nh4. Why\r\n\r\n* Less dependant on certain Titanium versions (e.g. should {{}} map to {{Ti.UI.iPad}} or {{Ti.UI.iOS}} namespace?)\r\n* More prepared for future Titanium versions (e.g. ALOY-1356)\r\n* Cut down on [custom parsers|https://github.com/appcelerator/alloy/tree/master/Alloy/commands/compile/parsers] - in particular for proxy elements (those which map to parent properties instead of {{.add()}}, enabling the above as well as less possible points of failure (e.g. ALOY-1282)\r\n* Less magic and higher predictability of XML parsing for developers\r\n* Would allow modules to use proxy elements as well, with need for Alloy to know how (like we now hard-coded {{ti.map}} support).\r\n\r\nh4. How\r\n\r\n* Drop [implicit namespaces|https://github.com/appcelerator/alloy/blob/master/Alloy/common/constants.js#L151] and always require developers to be in charge and thus conscious of which namespace or module they use via {{ns=\"Ti.UI.iOS\"}} an {{module=\"ti.map\"}}.\r\n* Replace as much proxy elements as we can by adding support for generic {{}} and {{}} elements, accompanied by a new {{parentProperty}} to tell Alloy which parent property to assign it to:\r\n\r\n{code:xml}\r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n{code}\r\n\r\n* Add \"parentMethod\" attribute for the developer to override the default {{add()}}, which can also be used with the above:\r\n\r\n{code:xml}\r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n{code}", "attachment": [], "flagged": false, "summary": "Make Alloy less dependent on knowledge about Titanium APIs for parsing XML", "creator": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "subtasks": [], "reporter": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "environment": null, "comment": { "comments": [ { "id": "380081", "author": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "body": "/cc [~fmiao] [~brentonhouse]", "updateAuthor": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2016-03-18T12:51:32.000+0000", "updated": "2016-03-18T12:51:32.000+0000" }, { "id": "380089", "author": { "name": "brentonhouse", "key": "brentonhouse", "displayName": "Brenton House", "active": true, "timeZone": "America/Chicago" }, "body": "I like either way, but I guess {{}} would give us more support for property names that might not be valid xml element names. ", "updateAuthor": { "name": "brentonhouse", "key": "brentonhouse", "displayName": "Brenton House", "active": true, "timeZone": "America/Chicago" }, "created": "2016-03-18T13:57:19.000+0000", "updated": "2016-03-18T13:57:19.000+0000" }, { "id": "380092", "author": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "body": "Good argument! I updated the description to use just that.", "updateAuthor": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2016-03-18T14:02:42.000+0000", "updated": "2016-03-18T14:07:08.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }