类库修改/迁移

发布于 2024-07-23 08:40:00 字数 356 浏览 3 评论 0原文

我有 3 个类库。 一个 BBL、一个 DAL 和一个 DATA(大约 15 个数据集)。 目前有 4 个[主要]应用程序利用这些 DLL 中的功能。 我正在重写其中一个应用程序,我需要 (1) 使用库中的一些现有功能 (2) 更改其中一些功能 (3) 添加新功能 (4) 添加新数据集。

我反复思考最好的方法来做到这一点,同时将风险降到最低。 一些想法..

1)使用现有项目,不做任何修改,仅添加 2)创建新的库,把我能用的代码带过来,并根据需要进行添加 3)在现有项目中实现部分类

最终所有4个应用程序都将使用最新的功能,但这将是一个缓慢的迁移; 所以旧代码还不能被弃用。

有什么想法吗?

I have 3 class libraries. A BBL, a DAL, and a DATA (about 15 datasets). Currently 4 [major] applications utilize the functionality in these DLL's. I'm rewriting one of those applications and I need to (1) Use some of the existing functionality in the libraries (2) Change some of it (3) Add new functionality (4) Add new datasets.

I'm back and forth about the best way to do this, while keeping my risks at a minimum. Some thoughts..

1) Use the existing projects and don't make any modifications, only additions
2) Make new libraries, bring over the code I can use, and make additions as needed
3) Implement partial classes in the existing projects

Eventually all 4 applications will use the newest functionality, but it will be a slow migration; so the old code can't be deprecated yet.

Any thoughts?

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

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

发布评论

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

评论(1

雨落星ぅ辰 2024-07-30 08:40:00

您在这里非常笼统(这可能就是您尚未收到任何答案的原因)。 这是重写/重构代码同时保持与周围环境的兼容性的典型现实示例。 您的问题没有简单的答案,但我想到了几点:

  • 如果没有任何可以开始的代码,请为您要重构/重写的代码编写测试。 这将使您能够验证您在操作过程中没有破坏东西。
  • 以小增量的方式工作。 尽量避免一次重写所有内容。 运行测试并经常提交。
  • 使用持续集成服务器,例如Hudson 为您自动构建和测试所有内容。

You're being very general here (that's probably why you haven't received any answers yet). This is a typical real-world example of rewriting/refactoring code while maintaining compatibility with its surroundings. There is no easy answer to your question, but a few points spring to mind:

  • Write tests for the code you're about to refactor/rewrite, if there aren't any to start with. This will enable you to verify that you're not breaking things as you go along.
  • Work in small increments. Try to avoid rewriting everything at once. Run your tests and commit often.
  • Use a Continuous Integration server such as Hudson to build and test everything automatically for you.
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文