Android、iPhone同步开发单片机
我正在阅读 SCM 和很好奇它如何应用于移动开发。
是否有可能为 iPhone 和 Android 创建一个项目,并制定基于技术的分支策略?我知道源代码完全不同,但至少资产(艺术、字符串等)可能由两个分支共享。
是否可以混合分支策略?就像按技术分支一样,也按版本分支?
还有其他推荐的在移动技术项目之间重用资产的方法吗?
I was reading up on SCM and was curious how it could apply to mobile development.
Would it be possible to create one project for both iPhone and Android and have a branching policy based on technology ? I know the source code is completely different but at least the assets (art, strings, etc.) could probably be shared by both branches.
And is it possible to mix branching policies ? As in branch by technology but also branch by version ?
Any other recommended approach to reuse assets between mobile technology projects ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如果您要共享资产,“按技术划分分支”当然是有意义的。另外,如果您最终使用不同的组件,并用 javascript、html 或两个平台通用的任何其他内容编写一些内容,则应该共享它们......
在每个“技术分支”中,我相信您会想要选择以下之一其他策略,例如“每个任务分支”或“每个组件分支”......
A "Branch Per Technology" could certainly make sense, if you're going to be sharing assets. Also, if you end up with different components, and write some things in javascript, or html, or anything else common to both platforms, it should be shared...
Within each "Technology Branch" I believe you would want to choose one of the other policies, like "Branch per Task" or "Branch per Component"...
不合理,恕我直言。在 Android 上,UI 很可能是用 Java 开发的,而在 iPhone 上,UI 很可能是用 Objective C(++) 开发的。因此,如果您计划在 Android 上重用通用逻辑,那么由于使用不同的语言,它无论如何都会与 UI 隔离。如果通用逻辑与 UI 不同——为什么要分支?仅当通用的、仅限 iPhone 和仅限 Android 的位混合在同一个文件中时,分支才有意义。对于这两个平台来说,这种可能性很小。
至于艺术和其他非代码位,平台域的粒度也不亚于文件。
Not reasonable, IMHO. On Android the UI will be, most likely, developed in Java and on iPhone - in Objective C(++). So if you plan to reuse common logic on Android, it will be isolated from the UI anyway, by virtue of being in a different language. And if common logic is distinct from the UI - why branch? Branching only makes sense if the common, iPhone-only and Android-only bits are intermixed in the same file. In case of these two platforms, it's very unlikely.
As for art and other non-code bits, for these, too, the platform domains are no less granular than file.