更新产品的最佳方式

发布于 2024-08-15 02:09:21 字数 672 浏览 3 评论 0原文

一些背景

我们提供一个由大型数据库和多个程序组成的复杂系统 - 大部分用 C# 编写,但一些遗留应用程序仍在 MFC 上运行。

我们提供的大部分内容都在单个服务器上运行(运行 SQL Server 和 SQL Management studio 2005),但是多个应用程序可以在多个客户端计算机上运行。更新这是一个真正的痛苦,因为在我们更新数据库后,过时的软件可能会因数据库更改而崩溃。手动更新服务器软件是一回事,但确保所有客户端软件也正常工作实际上是不可能的,而且随着时间的推移只会变得更糟。

我要编写一个更新服务,它将能够更新整个产品 - 更新数据库,重新安装服务和应用程序。 ,只应更新实际修改的程序/文件/表/等。每次有可用更新时下载整个产品并不是一个选择。此外,某些计算机可能只安装了可用程序的子集)

(但是 最重要的是,是否已经有一个好的方法可以做到这一点?如果有类似于 ClickOnce 的东西也能够更新已有的数据库,我宁愿使用它。

如果没有,更新时的最佳实践是什么?所有和任何材料将不胜感激。

提交更新后,我需要尽快在服务器上安装一些更新,无需任何用户输入。这包括 Windows 服务(始终运行)和任何数据库更改。进行这些更改后,我将必须阻止任何不是最新的软件访问已更改的部分或根本运行。

任何建议将不胜感激 - 如果我确实必须编写这样的系统,我想做得正确。

Some background:

We provide a complex system consisting of a large database and several programs - most written in C#, however some legacy applications are still running on MFC.

Most of the stuff we provide runs on a single server (runs SQL server and SQL Management studio 2005), however several applications can run on a number of client's computers. Updating this is a real pain, since after we update the database the outdated software is likely to break due to database changes. Updating the server software manually is one thing, however making sure all the client software works too is practically impossible, and will only get worse with time.

I am to write an updating service, which will be able to update the whole product - update the database, reinstall services and applications. (However only the programs / files /tables / etc that are actually modified should be updated. Downloading the whole product each time there is a update available is not an option. Also, some computers may only have a subset of avaliable programs installed)

First of all is there a already a good way of doing this? If there is something similar to ClickOnce that would also be able to update databases already out there I'd much rather use that.

If not, what are the best practices when it comes to updating? All and any material will be greatly appreciated.

I will need some updates to be installed on the server ASAP after the updates have been submitted, without any user input. That includes a windows service (that is running at all times) and any database changes. After these changes have been made, I will have to prevent any software that is not up to date from either accessing the parts that have been changed, or from running at all.

Any advice will be greatly appreciated - If I do have to write a system like that, I'd like to do it right.

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

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

发布评论

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

评论(2

萌梦深 2024-08-22 02:09:21

最佳实践是将应用程序打包在 MSI 中,并使用组策略将更新推送到每个客户端。

如果这是不可能的,那么您需要某种方式通知客户端应用程序它已经过时(简单地检查持有当前版本号的服务器可能就足够了)并拒绝工作,直到下载并安装更新补丁 -您甚至可以从应用程序本身内部启动此过程。

Best practice would be to package the app up in an MSI and use Group Policy to push the updates out to each client.

If that's not possible then you need some way of informing the client app that it is out-of-date (simple check against a server holding the current version number would probably suffice) and refuse to work until an update patch is downloaded and installed - you could even launch this process from inside the app itself.

惜醉颜 2024-08-22 02:09:21

这个答案可能对您有帮助,我个人没有使用过Wix 但这似乎符合您正在寻找的内容。请务必查看链接教程中的第 4 课,因为这提供了您需要的详细信息。

我不确定在更新方面您会在哪里找到最佳实践,但在我个人看来,您不应该强迫用户更新,除非它破坏了底层应用程序(就像您的应用程序一样)。我很想知道是否有人有关于此主题的最佳实践列表的链接。

编辑

我对更新的可能最佳实践感兴趣,因此我开始了另一个问题线程此处。答案中的普遍共识是“询问用户/客户”,但答案中可能还有一些其他细节可能对您有帮助,恐怕我在任何地方都找不到关于该主题的任何实际硬规则(我在正在期待)。

This answer may help you, I haven't personally used Wix but this seems to be along the lines of what you're looking for. Make sure to check out Lesson 4 in the linked tutorial, as this provides the details you would require.

I'm not sure where you would find best practices when it comes to updating, but in my personal opinion you shouldn't ever force a user to update unless it breaks the underlying application (like yours does). I would be very interested to hear if someone has a link to a list of best practices on this topic.

Edit

I was interested in possible best practices for updating so I started another question thread here. The general consensus in the answers is "Ask the user/client", but there may be some other details in the answers which may help you, I'm afraid I can't find any actual hard rules on the subject anywhere (which I was expecting).

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