问题描述
我知道 乔尔说永远不要这样做,我同意这一点大多数情况下.我确实认为有些情况是合理的.
I know Joel says to never do it, and I agree with this in most cases. I do think there are cases where it is justified.
我们有一个使用 MFC 前端和 Windows 服务作为核心组件的大型 C++ 应用程序(总共大约 250,000 行代码).我们正在考虑将项目迁移到 C#.
We have a large C++ application (around 250,000 total lines of code) that uses a MFC front end and a Windows service as the core components. We are thinking about moving the project to C#.
我们考虑重写的原因是:
The reasons we are thinking about rewriting are:
- 更快的开发时间
- 使用 WCF 和其他 .NET 内置功能
- 各种操作更加一致系统
- 更简单的 64 位支持
- 许多不错的 .NET 库和那里的组件
有人做过这样的重写吗?成功了吗?
Has anyone done a rewrite like this? Was it successful?
该项目现在已经有将近 10 年的历史了,我们已经意识到添加我们想要的新功能将是编写 .NET 已经内置的重要功能.
The project is almost 10 years old now, and we are getting to the point that adding new features we want would be writing significant functionality that .NET already has built-in.
推荐答案
你有没有想过,如果还没有从头开始重新编写,你应该开始分离 GUI 和后端层,然后你可以开始用 C# 编写它的一部分.
Have you thought about instead of re writing from scratch you should start to separate out the GUI and back end layer if it is not already, then you can start to write pieces of it in C#.
这 250,000 行不是一夜之间写出来的,它们包含了数十万人类年的努力,所以没有足够理智的人会建议从头开始一次全部重写.
the 250,000 lines were not written overnight they contains hundreds of thousands of man years of effort, so nobody sane enough would suggest to rewrite it all from scratch all at once.
如果你们打算这样做,最好的方法是逐个进行.否则要求您的管理层进行几年的开发工作,而您现有的产品中没有实现新功能(基本上在竞争面前停滞不前)
The best approach if you guys are intend on doing it is piece by piece. otherwise ask for several years of development effort from your management while no new features are implemented in your existing product (basically stagnating in front of competition)
这篇关于曾经用 C# 完全重写过大型 C++ 应用程序吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!