dongshi7433 2010-09-20 00:39
浏览 49
已采纳

我应该如何组织基于框架的项目的源代码管理?

I'm struggling trying to sort out what the best-practice is for putting a project under source control when the project is written against a framework. In my situation I will be using Mercurial for source control.

Most PHP frameworks have an 'application' folder where I'm supposed to put my code that interacts with the framework. So is it best to put the application folder into it's own repository and then have another repository for the framework files? Or is it better to put everything, including the framework, into a single repository?

I'd like to be able to have a decent amount of flexibility, namely I'd like to be able to swap out the version of the framework I'm using for experimentation while still being able to publish changes using the stable version.

I have experience with both the Kohana and Zend Framework frameworks so if you could use those as references that would be fantastic.

  • 写回答

4条回答 默认 最新

  • doulingzhuang3079 2010-09-20 00:55
    关注

    Well i dont use Mecrucial but perhaps my typical set up with Subversion will apply after you translate it :) I dont use a local centralized installation. I fnd that more often than not ill be using a specific version for each application i work on given the fast releas cycles of frameworks. So i always embed them within a project.

    For Zend:

    svn/path/
      trunk/
        application/
        library/
          Zend/  
          MyNamespace/
        public/
        data/
    

    I use an svn:external to the version of the framework i want.... for example: http://framework.zend.com/svn/framework/standard/tags/release-1.10.5/library/Zend

    For Symfony its much the same using externals for both symfony and any plugins. the difference is libraries like symfony and Zend i would put in a vendor directory instead of directly in lib:

    svn/path/
      trunk/
        apps
        lib/
          vendor/
            Zend/  
            symfony/
        plugins/
        web/
        config/
        data/
        cache/
        log/
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(3条)

报告相同问题?

悬赏问题

  • ¥30 截图中的mathematics程序转换成matlab
  • ¥15 动力学代码报错,维度不匹配
  • ¥15 Power query添加列问题
  • ¥50 Kubernetes&Fission&Eleasticsearch
  • ¥15 報錯:Person is not mapped,如何解決?
  • ¥15 c++头文件不能识别CDialog
  • ¥15 Excel发现不可读取的内容
  • ¥15 关于#stm32#的问题:CANOpen的PDO同步传输问题
  • ¥20 yolov5自定义Prune报错,如何解决?
  • ¥15 电磁场的matlab仿真