Umbraco:使用版本控制?测试/生产?

发布于 2024-08-05 12:06:02 字数 271 浏览 2 评论 0原文

我正在考虑在我的网站上使用 Umbraco,到目前为止我很喜欢它。

我遇到的一个大问题是,由于大量数据都在数据库中,因此如何对 Umbraco 站点进行版本控制?

如何设置测试/开发环境并以简化的方式部署到生产?

今天(没有 Umbraco)我使用了 SVN。使用不同的数据库副本进行测试和生产。

我建立的网站基本上是一个具有完整后端的个人广告网站。将 umbraco 表保存在单独的数据库中并将我的业务数据保存在另一个数据库中是否有意义? (由一堆用户控件访问)

I'm looking into using Umbraco for my site and so far I'm loving it.

One big question that I have is how can I version control an Umbraco site as a lot of the data is in the database?

How do you setup a test/dev environment and deploy to production in a streamlined way?

Today (without Umbraco) I used SVN. with different copies of the database for test and production.

The site I building is basically a personal ads site with a complete backend. Would it make sence to keep umbraco tables in a sepparate database and keep my business data in another? (accessed by bunch of user controls)

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

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

发布评论

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

评论(2

梦魇绽荼蘼 2024-08-12 12:06:02

这是开始与 Umbraco 合作时常见的障碍,答案是使用适合您的方法。

然而,Umbraco 论坛上有很多关于这件事的讨论,请看这里:

http://our.umbraco.org/forum/core/general/3619-Source-control-and-multiple-developers
http:// /our.umbraco.org/forum/getting-started/installing-umbraco/2918-Update-an-Umbraco-website?p=0#comment11311

要考虑的关键是内容和代码的划分。 umbraco 中的大多数代码都存储在数据库外部,因此可以存储在 subversion 或任何其他源代码控制平台中。例如,模板、XSLT、CSS、XSLT 扩展等都存储在文件系统上。

页面内容和站点结构存储在数据库中。

有一些灰色区域,最明显的是字典,它可以包含各种事物和内容。

我们与 Umbraco 的合作方式如下:

我们有一个单独的 Visual Studio Web 项目 其中包含模板、XSLT、CSS、事件处理程序、用户控件等的文件夹。这些文件夹存储在 SVN 中。然后,在构建此项目时,文件将被复制或编译并复制到 umbraco 站点的测试/开发服务器实例。

一旦更改获得批准,我们只需复制文件即可。

如果您需要在 Umbraco 实例之间同步内容,您可以使用 Umbraco Pro(其中包括一个名为 Courier 的组件,正是用于此目的)或备份实时数据库并在需要时恢复到您的开发环境(甚至使用复制) )。

我们主要尝试避免在测试/开发环境中编辑内容,因为这是将内容合并回实时站点可能会变得棘手的地方。然而有时这是不可避免的。我们还尝试避免通过 Umbraco 界面编辑模板等。

最后一个问题“我应该将业务数据存储在另一个数据库中”的答案相当棘手,因为它很大程度上取决于您要如何处理数据。如果内容最适合存储在 CMS 中,则将其存储在 CMS 中,但是如果它是不适合 CMS 的高度关系数据,则将其单独存储。

我们目前正在进行一个项目,其中数据存储在外部数据库中,并且我们已将应用程序直接集成到 Umbraco 后端中。这是一项不简单的任务(尽管通过用户控件获取一些数据很容易),您应该仔细考虑外部存储数据所需的工作量与 CMS 的内置功能以及您必须玩的预算/时间和。

如果您想使用我们提供的 Visual Studio 模板,您可以从我们的网站。

This is a common hurdle when starting to work with Umbraco and the answer is to use what works for you.

However there have been many discussions on Umbraco forums about this very thing, take a look here:

http://our.umbraco.org/forum/core/general/3619-Source-control-and-multiple-developers
http://our.umbraco.org/forum/getting-started/installing-umbraco/2918-Update-an-Umbraco-website?p=0#comment11311

The key thing to consider is the delineation of content and code. Most code in umbraco is stored externally to the DB and as such can be stored in subversion or any other source control platform. For example, templates, XSLT, CSS, XSLT extensions etc are all stored on the file system.

Page content and site structure are stored in the DB.

There are some grey areas, most notably the dictionary which can contain all sorts of things as well as content.

The way we work with Umbraco is as follows:

We have a separate Visual Studio Web Project which contains folders for templates, XSLT, CSS, event handlers, user controls etc. This is stored in SVN. Then on build of this project the files are copied over or compiled and copied over to our test/dev server instance of the umbraco site.

Once the changes are approved we just copy the files up.

If you need to sync the content between Umbraco instances you can either use Umbraco Pro (which includes a component called Courier, which is precisely for this purpose) or back up your live DB and restore into your dev environment when needed (or even use replication).

We mostly try and avoid editing content in the test/dev environment as this is where merging the content back up to the live site can get tricky. However sometimes this is unavoidable. We also try and avoid editing templates etc through the Umbraco interface.

The answer to your final question, "should I store my business data in another DB", is rather tricky as it depends very much on what you are going to do with the data. If it is content that would be best stored in the CMS store it in the CMS, however if it's heavily relational data that doesn't really fit in a CMS then store it separately.

We are undertaking a project currently where data is stored in an external DB and we have integrated an application directly into the Umbraco backend. This was a non-trivial task (although just grabbing some data via user controls is easy) and you should consider carefully the level of effort required to store your data externally vs the inbuilt functionality of the CMS and the budget/time you have to play with.

If you want to use the visual studio template we do then you can download it from our website.

我不是你的备胎 2024-08-12 12:06:02

我知道这个问题已经得到了回答,但我只是想强调这样一个事实:在内容和代码同步方面已经取得了很多进展。例如 - uSyncuSiteBuilder 都是外观精美的软件包,允许使用代码控制文档类型和数据类型等 CMS 内容,从而进行版本控制。它们的使用相当简单,不过当然请在使用它们之前进行备份。媒体通常使用导出媒体之类的方式进行备份,但通常情况下并非如此最好将媒体文件夹从其默认位置放入 SVN 中。相反,将其放在自己的分支中,并将其作为虚拟目录托管在 IIS 中。这样您的媒体就独立于代码。

尽管有很多事情正在进行中,但大多数现代 CMS 要想拥有与版本控制良好配合的解决方案还有很长的路要走。 Umbraco 是一个很棒的 CMS,拥有庞大的社区。

I know this has already been answered but I just wanted to highlight the fact that a lot of headway has been made with regards to content and code synchronizing. For example - uSync and uSiteBuilder are both great looking packages that allow CMS content such as document types and data types to be controlled using code, and therefore version controlled. They are fairly straightforward to use, although of course please do take backups before using these. Media is usually backed up using something like Export Media although usually it is not a good idea to have your media folder in SVN from its default location. Instead put it in its own branch and host it in IIS as a virtual directory. This way your media is independent of the code.

There is a long way to go with most modern CMS' to have solutions that work well with version control, although there are many things under way. Umbraco is a great CMS and has a huge community.

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