通过移动版本进行颠覆的分支策略

发布于 2024-09-25 22:50:35 字数 1447 浏览 3 评论 0原文

我正在为移动设备开发一系列应用程序,我们将它们称为 Orange、Cherry 和 Pear。现在,由于我对 Blackberry 很熟悉,我选择开始在 Blackberry 平台上实现这三个应用程序中的第一个应用程序 Orange。我找到了一种将多个 Blackberry 平台(因为它们在不同 BB 操作系统之间使用相对相同的 API,除了一些例外)集成到同一个代码库中的方法。目前,我的代码库看起来像这样:

Orange/
  trunk/
   src/
     ... orange's source tree...
  branches/
    1.0/
     ... orange's source tree as it looked at release 1.0 ...
  tags/
     1.0.0/
     1.1.0/

所以,基本上,我在分支中使用基于版本的方法。然而现在,我们希望将此应用程序迁移到 Android 平台(并且在某个时间点,可能迁移到其他移动甚至桌面平台)。所以,我的问题是,跨多个平台使用单个应用程序进行分支的最佳方法是什么?我已阅读分支策略,以及许多分支策略网页(例如http://www.codinghorror.com/blog/2007/10/software -branching-and-parallel-universes.html ),但我仍然不相信基于“公共”主干的分支(例如,如最后一个链接中所描述的“按技术分支”)。

我仍然不相信的原因是我相信基于版本的分支策略。这似乎合乎逻辑;如果您想维持不同的开发阶段,那么分支似乎是实现此目的的理想方式。如果我的代码的某些方面在所有三个平台之间都是“通用”的,那么我决定制作一个 android 版本,我是否将所有代码从通用和 android 主干中分支出来以制作一个新的版本标签?或者,我是否也将所有代码保留在 android 和黑莓分支的“公共”分支中?

我想也许我可以做的另一件事是创建单独的项目,例如 Orange-blackberry 和 Orange-android。然而,这可能会使我的 svn 存储库变得混乱,因为我们将所有项目都保存在同一个存储库中。因此,不可避免地,我将拥有 Orange-blackberry、orange-android、cherry-android、cherry-blackberry、pear-android、pear-blackberry,以及我创建的任何其他应用程序的一系列项目文件夹。

因此,我正在寻找一些关于管理所有这些混乱的最佳方法的反馈。另外,如果您能提出一些关于从我当前的实现转移到较新的实现的后勤工作的想法(即我应该使用哪些 svn 命令来维护历史记录),我将非常感激。

I'm developing a series of applications for mobile devices, we'll call them Orange, Cherry, and Pear. Now, because of my familiarity with Blackberry, I chose to begin implementing the first of these three applications, Orange, on the Blackberry platform. I found a way to integrate a number of Blackberry platforms (since they use relatively the same API among different BB operating systems, with some exceptions) into the same codebase. Currently, my codebase looks something like this:

Orange/
  trunk/
   src/
     ... orange's source tree...
  branches/
    1.0/
     ... orange's source tree as it looked at release 1.0 ...
  tags/
     1.0.0/
     1.1.0/

So, basically, I'm using a version-based methodology to my branching. Now, however, we want to migrate this application to the Android platform (and, at some point in time, probably to other mobile or even desktop platforms). So, my question is, what is the best method for branching with a single application across multiple platforms? I have read Branching Strategies, as well as a number of branching strategy webpages (e.g. http://www.codinghorror.com/blog/2007/10/software-branching-and-parallel-universes.html ), but I'm still unconvinced at branching based on having a 'common' trunk (e.g. as described in the last link as 'Branch per Technology').

The reason I remain unconvinced is that I'm a believer in the version-based branching strategy. It seems logical; if you want to maintain separate stages of development, then branches seem like the ideal way to do this. If I have aspects of the code that are 'common' between all three platforms, then I decide to make an android release, do I branch all of the code from the common and android trunks to make a new release tag? Or, do I keep all of the code in the 'common' branch in the android and blackberry branches as well?

I thought that perhaps another thing I could do would be to create separate projects, for instance orange-blackberry and orange-android. This might clutter my svn repository, however, since we keep all of our projects in the same repository. So, inevitably, I will have orange-blackberry, orange-android, cherry-android, cherry-blackberry, pear-android, pear-blackberry, along with a series of project folders for any other application I create.

So, I'm looking for some feedback about what might be the best way to manage all of this chaos. Also, if you could throw in some ideas about the logistics of transferring from my current implementation to the newer one, (i.e. what svn commands I should use to maintain history), that would be very much appreciated.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

不再让梦枯萎 2024-10-02 22:50:35

BlackBerry Java 代码是 j2me,因此源代码必须符合 Java 1.3。 Android 可以使用一直到 Java 6 的 Java 功能。如果您希望您的应用程序看起来不错,您将使用 RIM 专有的 UI 组件 (net.rim.device.*),而这些组件在 Android 上不可用。

我不认为 Android 版本的应用程序是 BlackBerry 的分支。你应该从头开始。这些平台将共享很少的代码,并且可以共享的代码最好被分解到两个项目合并的库 jar 中。

BlackBerry Java code is j2me, so source code must be Java 1.3 compliant. Android can use Java features all the way up to Java 6. If you want your app to look decent, you will be using the RIM proprietary UI components (net.rim.device.*) and those won't be available on Android.

I wouldn't consider an Android version of an application to be a branch of BlackBerry. You should just start from scratch. The platforms will share very little code, and the code that can be shared would be best factored into a library jar that both project incorporate.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文