我应该为业务逻辑准备一个还是多个 dll?

发布于 2024-09-05 13:18:48 字数 441 浏览 5 评论 0原文

就我而言,我的公司为多种类型的客户提供服务。几乎每个客户都需要自己的业务逻辑。当然,所有业务逻辑都应该继承一个基础层。然而,我会反复考虑这一点——要么为所有客户使用一个 dll,要么为每个客户使用一个 dll。

我最大的争论点是软件升级。我们有大约 12 名数据录入人员,与 20 家公司合作,他们的停机时间很少,这一点至关重要。我担心的是,如果我将所有内容都部署在一个 dll 中,我可能会在 A 公司的逻辑中引入一个错误,而只想更新 B 公司的逻辑。我相信,如果每个公司的逻辑都有自己的 dll,我可以降低风险,这样我就可以部署 B 公司的更新,而不会损害 A 公司的更新。 ——我将是唯一支持这一点的人。

也就是说,管理 20 个不同的 .dll 似乎也是一场噩梦——仅对于 BLL 而言。我还需要创建一个视图层和视图模型层。因此,我可能有 20 个(公司)* 3 个(层),这相当于 60 个 .dll。

谢谢。

In my situation, my company services many types of customers. Almost every customer requires their own Business Logic. Of course, there will be a base layer that all business logic should inherit from. However, I'm going back and forth on architecting this--either in one dll for all customers or one dll for each.

My biggest point of contention deals with upgrading the software. We have about 12 data entry personnel that work with 20 companies and it's critical that they have little down time. My concern is that if I deploy everything in one dll, I could introduce a bug in company A's logic while only intending to update Company B's logic. I believe I could reduce the risk if each company's logic had their own dll, so then, I could deploy Company B's update w/o harming Company A's. -- I will be the only one supporting this.

That said, this also seems like a nightmare to manage 20 different .dll's -- that's for the BLL alone. I also need to create a View layer and ViewModel layer. So, potentially, I could have 20 (companies) * 3 (layers) which would equate to 60 .dll's.

Thank You.

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

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

发布评论

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

评论(1

情感失落者 2024-09-12 13:18:48

如果“客户至上”,那么您必须减少一个客户代码中的错误影响另一个客户的可能性。因此需要更多的DLL。但是,您可以考虑一下避免一些头痛:是否真的需要将业务逻辑、视图层和视图模型层分离到不同的程序集中?当然,您希望分成不同的代码层进行维护,但是是否有充分的理由将逻辑文件分离转变为物理程序集/DLL 分离?

If "customer comes first" then you must reduce the likelihood of a bug in one customer's code affecting another customer. Therefore more DLLs. However, you can look at saving some headache: is there really a need to separate business logic, view layer, and viewmodel layer into different assemblies? Sure, you want to separate into different layers of code for maintenance, but is there a strong reason for taking that logical file separation to a physical assembly/DLL separation?

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