{ "id": "91665", "key": "TIMOB-9079", "fields": { "issuetype": { "id": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [], "resolution": null, "resolutiondate": null, "created": "2012-05-09T12:59:33.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [ "cb-tooling", "core" ], "versions": [ { "id": "13272", "description": "Release 2.0.1", "name": "Release 2.0.1", "archived": true, "released": true, "releaseDate": "2012-04-16" } ], "issuelinks": [ { "id": "52549", "type": { "id": "10002", "name": "Duplicate", "inward": "is duplicated by", "outward": "duplicates" }, "inwardIssue": { "id": "109156", "key": "TIMOB-12581", "fields": { "summary": "TiAPI: Rework Resources folder", "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": "Low", "id": "4" }, "issuetype": { "id": "7", "description": "gh.issue.story.desc", "name": "Story", "subtask": false } } } } ], "assignee": null, "updated": "2018-02-28T20:04:21.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": "10207", "name": "Tooling" } ], "description": "It would make the {{Resources}} folder in a Titanium project much cleaner if we had a {{platforms}} folder, under which all specific platform folders, like {{iphone}}, {{android}}, {{mobileweb}}, would reside. It just makes for less clutter in the overall project.\r\n\r\nWhile they serve 2 different purposes, we may also want to consider condensing what can be done with the root-level {{platform}} directory, and what can be done in the {{Resources/PLATFORM}} directories. Just throwing ideas out for discussion, but perhaps a layout like this would work...\r\n\r\n* Resources\r\n** app.js\r\n** platform\r\n*** android\r\n**** native\r\n***** AndroidManifest.xml\r\n***** res\r\n****** values\r\n******* strings.xml\r\n**** project\r\n***** app.js\r\n*** iphone\r\n*** mobileweb\r\n\r\nThis is probably not an ideal layout, but it gives an idea of how we can organize all platform-specific elements in one location without continue to crowd the project structure.\r\n", "attachment": [], "flagged": false, "summary": "Tooling: Organize \"Resources\" folder with a \"platforms\" directory", "creator": { "name": "tlukasavage", "key": "tlukasavage", "displayName": "Tony Lukasavage", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "tlukasavage", "key": "tlukasavage", "displayName": "Tony Lukasavage", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "195691", "author": { "name": "ngupta", "key": "ngupta", "displayName": "Neeraj Gupta", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Imposing rigid structure may be counterproductive and possibly break existing applications. We already have the \"platform\" directory that is intended to hold platform-specific resources. We may just need to document it better.", "updateAuthor": { "name": "ngupta", "key": "ngupta", "displayName": "Neeraj Gupta", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-05-22T20:37:31.000+0000", "updated": "2012-05-22T20:37:31.000+0000" }, { "id": "195711", "author": { "name": "tlukasavage", "key": "tlukasavage", "displayName": "Tony Lukasavage", "active": true, "timeZone": "America/Los_Angeles" }, "body": "My concern is that the pollution of the {{Resources}} directory grows with each new platform we add. Soon a developer will have {{android}}, {{iphone}}, {{mobileweb}}, and {{blackberry}} dumped into their {{Resources}} path before they even start their project. As these folders pile up, they make for harder organization when a developer is attempting to establish their own structure, be it MVC or otherwise, or even eventually having ZipTi in their project. It seems to me that when a developer is defining a project structure, they will have a much easier time visualizing and creating it if they have 1 special folder to worry about accounting for instead of 4-5.\r\n\r\nI understand that we have a {{platform}} directory already, and I thought it may be beneficial to find a way to combine the project-level {{platform}} directory with the {{Resources}}-level directory, so as to provide a single home for all platform-specific code and resources. As stated above, I don't necessarily think that the structure I proposed is the best, or even a good one. I just wanted to get a conversation going on how we can better organize code and folders in such a way as to facilitate the building of scalable applications.\r\n\r\nWe are imposing structure now, just in a less structured manner. I'm suggesting we locate that imposition in a single, intuitive location. And yes, I share the concern of this potentially causing problems for existing apps. I don't think that precludes us from talking about how we can improve the structure of future (and many existing) apps though. ", "updateAuthor": { "name": "tlukasavage", "key": "tlukasavage", "displayName": "Tony Lukasavage", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-05-23T05:40:51.000+0000", "updated": "2012-05-23T05:51:32.000+0000" }, { "id": "195775", "author": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "body": "No. We should not do any special processing of the Resources directory (your suggestion potentially breaks many existing apps by treating Resources contents in a special way, which we do not do). Again, the platform-specific resources are copied in at the time of build - or should be.", "updateAuthor": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-05-23T10:23:19.000+0000", "updated": "2012-05-23T10:23:19.000+0000" }, { "id": "264805", "author": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "body": "I was just talking with Bryan and he had a great idea. Instead of creating a \"platforms\" directory in the Resources directory, create \"Resources-ios\", \"Resources-android\", \"Resources-mobileweb\" (and so on) that would live NEXT to the Resources directory. This way things are explicit, more elegant, backward compatible, and we don't have to jump through hoops to blacklist platform folders from being bundled into the built app. I very much would like to add support for this in 3.2.0. Thoughts?", "updateAuthor": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "created": "2013-08-02T21:19:31.000+0000", "updated": "2013-08-02T21:19:31.000+0000" }, { "id": "264810", "author": { "name": "tlukasavage", "key": "tlukasavage", "displayName": "Tony Lukasavage", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Very much more explicit and backwards compatible, though I'd disagree with it being elegant. It seems just as messy (if not moreso) as does having all the platform folders listed at the top-level of Resources. I don't really see the advantage to moving them in this manner. That is, I don't see any advantage to the developer. It might make our lives easier under the hood, but the developer is not getting any kind of win in terms of organization here.", "updateAuthor": { "name": "tlukasavage", "key": "tlukasavage", "displayName": "Tony Lukasavage", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-08-02T21:29:10.000+0000", "updated": "2013-08-02T21:29:10.000+0000" }, { "id": "264817", "author": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I agree that I don't like the Resources- folders. I'm not positive what the proper solution is yet, though.", "updateAuthor": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-08-02T21:39:27.000+0000", "updated": "2013-08-02T21:39:27.000+0000" }, { "id": "272254", "author": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "body": "My feeling is this will be solved as part of ti.next. I don't see this as pressing to solve for 3.2.0.", "updateAuthor": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-09-20T22:44:52.000+0000", "updated": "2013-09-20T22:44:52.000+0000" } ], "maxResults": 7, "total": 7, "startAt": 0 } } }