原生 C++ 或 .NET for Business 应用程序?
事情是这样的:我正在规划一个中型商业应用程序,它绝对必须支持Win2k。 AFAIK,对 Win2k 的官方 .NET 支持不久前就被取消了(IIRC,它停止在 2.0 版本)。
现在,我(很久以前)已经用 C++ 编写了库,这些库使我能够像在 .NET Framework 的帮助下编写此应用程序一样快地完成最终结果(即完成该项目)——所以 .NET 的RAD的“优势”几乎被否定。
我确信这里有很多人处理需要支持旧操作系统的业务应用程序。 那么,考虑到我的图书馆情况,使用 .NET 相对于本机 C++ 有什么优势,反之亦然? 我只是不确定这两者中哪一个适合这份工作——因为我似乎可以使用其中任何一个。 再说一次,还有框架支持问题需要处理......
如果需要,我很乐意添加更多信息。
Here's the deal: I'm in the process of planning a mid-sized business application that absolutely must support Win2k. AFAIK, official .NET support for Win2k was scrapped a while ago (IIRC, it stopped at version 2.0).
Now, I already wrote (ages ago) libraries in C++ that allow me to accomplish the end result (i.e., finish this project) just as quickly as if I was writing this application with the help of the .NET Framework -- so .NET's RAD "advantage" is almost negated.
I'm sure a lot of people here deal with business applications that need to support old OS's. So, given my library situation, what advantage(s) are there for me in using .NET over native C++ and vice versa? I'm just not sure which of the two is right for the job -- because it seems that I could use either. Then again, there's that framework support issue to deal with...
I will gladly add more information, if required.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(6)
在 Windows 2000 下运行的最后一个 .NET 版本是 .NET 2.0 SP2。 它确实包含 System.Core.dll(属于 .NET 3.5 的一部分)所需的功能。
答案是肯定的,如果您不打算使用.NET 3.0库(WCF、WF、WPF、CardSpace),则可以在 Windows 2000 下使用.NET 3.5 SP1 。 但是你有 LINQ、LINQ to XML、LINQ to SQL。
您唯一需要做的就是部署三个核心 .NET 3.5 SP1 文件:
此方法的缺点(仔细阅读):
The last .NET version that runs under Windows 2000 is .NET 2.0 SP2. It does include the features required by System.Core.dll (that is part of .NET 3.5).
The answer is YES, you can use .NET 3.5 SP1 under Windows 2000 if you're not going to use .NET 3.0 libraries (WCF, WF, WPF, CardSpace). But you have LINQ, LINQ to XML, LINQ to SQL.
The only thing you need to do is to deploy three core .NET 3.5 SP1 files:
Disadvantages of this method (read carefully):
我想看看 Mono (mono-project) 是否适合您。 ie 在 win2k 上运行 - 如果可以,您可以将应用程序移植到 MS .NET 和更高版本的操作系统(如果项目后期需要的话)。 恕我直言,任何 .NET 都会比 C++ 更容易:)
I'd look to see if Mono (mono-project) works for you. i.e. runs on win2k - if it does it would allow you to port your app to MS .NET and later OS versions should the need arise later in the project. Any .NET is going to be easier than C++ IMHO :)
最大的区别是,在您转向其他事情之后,您(或您的老板)更有可能找到开发人员来维护您的 .NET 代码。
C++ 的优点是可以给你工作稳定性——尽管这可能不是你想要的。 :)
The biggest difference is that you are (or your boss is) more likely to find developers to maintain your .NET code after you move on to other things.
C++ has the advantage of giving you job stability - although that might not be what you want. :)
我认为,考虑到你的情况,归结为你觉得写作更舒服。 如果 C++ 对您来说是一种舒适的语言,那就这样做。 它将帮助您深入了解代码并使其更容易完成。
我也会小心地牢记未来。 如果 Win2K 要求下降,如果您是用 C++ 编写的,则可能需要您重写。 可能不会。 在您决定如何继续时请记住这一点。
I think, given your situtation, it boils down to what you feel more comfortable in writing. If C++ is a comfortable language for you, do that. It will help get you into the code and make it easier to finish.
I would also take care to keep the future in mind. If the Win2K requirement drops that might require you to rewrite if you wrote in C++. It might not. Just keep it in mind while you decide how to proceed.
您可以使用 .NET 进行开发,但将编译器选项设置为针对 .NET 2.0 框架。 如果操作系统在不久(或遥远)的将来升级,您可以升级您的程序以针对 3.5 框架。 我会走这条路线,因为它可以让其他人更轻松地进行未来的维护。
You can develop with .NET but set the compiler options to target the .NET 2.0 framework. If the OS gets upgraded in the near (or far) future, you can upgrade your program to target the 3.5 framework. I would go this route as it allows for easier future maintenance by others.
你考虑过德尔福吗? 您可以免费下载 Turbo Delphi,使用它您可以轻松编写针对 Windows 2000 的代码。使用 Delphi,您将获得出色的 RAD(可以说比您在 C++ 中找到的任何东西都要好……除非您使用 C++ Builder)。
Delphi 创建本机代码,并且没有运行时要求。
当然,缺点是如果您不了解 Delphi(即 Object-Pascal),您必须熟悉一门新语言。 然而,如果您了解 C++,您很快就会在 Delphi 中找到宾至如归的感觉。
Have you considered Delphi? You can download Turbo Delphi for free and it you can easily write code targeting Windows 2000. With Delphi, you'll get an excellent RAD (arguably better than anything you'll find in C++...unless you use C++ Builder).
Delphi creates native code, and has no runtime requirements.
Of course, the downside is if that you don't know Delphi (which is Object-Pascal) you have to familiarize yourself with a new language. However, if you know C++, you'll feel at home in Delphi in no time.