一次开发多个非常相似的项目

发布于 2024-09-04 18:55:09 字数 1431 浏览 2 评论 0原文

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

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

发布评论

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

评论(2

茶花眉 2024-09-11 18:55:09

如果这些项目除了几个文件之外都是相同的,为什么不设置几个项目(SVN 中的文件夹),每个项目只包含这些不同的文件和一个 对包含所有常见内容的项目(文件夹)的外部引用

像这样的事情:

--+
  +-+ project1
  | +- => common
  | +- config.file
  | +-+ data
  |   +- blah
  |   +- wrxgl
  |   +...
  +-+ project2
  | +- => common
  | +- config.file
  | +-+ data
  |   +- blah
  |   +- wrxgl
  |   +...
  +-+ project2
  | +- => common
  | ...
  +-+ common
    +- foo
    +- bar
    +- baz
    +...

If these projects are identical except for a few files, why not setup several projects (folders in SVN) each of which only contains these differing files and an external reference to a project (folder) with all the common stuff?

Something like this:

--+
  +-+ project1
  | +- => common
  | +- config.file
  | +-+ data
  |   +- blah
  |   +- wrxgl
  |   +...
  +-+ project2
  | +- => common
  | +- config.file
  | +-+ data
  |   +- blah
  |   +- wrxgl
  |   +...
  +-+ project2
  | +- => common
  | ...
  +-+ common
    +- foo
    +- bar
    +- baz
    +...
始于初秋 2024-09-11 18:55:09

除非每个站点都非常独特,否则我个人只会有一个在资源文件中包含翻译的分支。我的数据模型能够成为本地数据,因此当整个数据模型上线时,就会有一组文件和一个数据库来提供所有数据。

也许我被宠坏了。我通过 Django 免费获得了很多这样的功能,但是 gettext 非常通用,并且排序路由(等)并不那么困难。

Unless each site is significantly unique, I personally would have only had one branch with translations in resource files. My data models would have the ability to be local so when the whole thing went live there was one set of files and one database feeding the whole lot.

Perhaps I'm spoilt. I get a lot of this functionality for free with Django but gettext is pretty universal and sorting routing (et al) isn't that tough.

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