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).
这是交易:我正在规划一个绝对必须支持Win2k的中型企业应用程序。 AFAIK,对Win2k的官方.NET支持很久以前就被取消了(IIRC,它在版本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.
现在,我已经用C ++写了(很久以前)库,它允许我完成最终结果(即完成这个项目),就像我在.NET Framework的帮助下编写这个应用程序一样快 - 所以.NET的RAD“优势”几乎被否定了。
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...
我相信很多人在这里处理需要支持旧操作系统的业务应用程序。那么,鉴于我的库情况,使用.NET而不是原生C ++有什么优势,反之亦然?我只是不确定这两个中哪一个适合这项工作 - 因为我似乎也可以使用它们。然后,还有那个框架支持问题来处理......
I will gladly add more information, if required.
如果需要,我很乐意添加更多信息。
6 个解决方案
#1
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).
在Windows 2000下运行的最后一个.NET版本是.NET 2.0 SP2。它确实包含System.Core.dll(它是.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.
答案是肯定的,如果你不打算使用.NET 3.0库(WCF,WF,WPF,CardSpace),你可以在Windows 2000下使用.NET 3.5 SP1。但是你有LINQ,LINQ to XML,LINQ to SQL。
The only thing you need to do is to deploy three core .NET 3.5 SP1 files:
您需要做的唯一事情是部署三个核心.NET 3.5 SP1文件:
- System.Core.dll
- System.Xml.Linq.dll (LINQ to XML)
- System.Data.Linq.dll (LINQ to SQL)
System.Xml.Linq.dll(LINQ to XML)
System.Data.Linq.dll(LINQ to SQL)
Disadvantages of this method (read carefully):
这种方法的缺点(仔细阅读):
- Not sure whether it's permitted or forbidden by the EULA (end-user license agreement)
- This scenario is not supported by Microsoft.
不确定是否允许或禁止EULA(最终用户许可协议)
Microsoft不支持此方案。
#2
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 :)
我想看看Mono(单声道项目)是否适合你。即在win2k上运行 - 如果确实如此,它将允许您将应用程序移植到MS .NET以及稍后的OS版本,如果需要在项目后期出现。任何.NET都比C ++更容易恕我直言:)
#3
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.
最大的区别在于,在您转向其他事情之后,您(或您的老板)更有可能找到开发人员来维护您的.NET代码。
C++ has the advantage of giving you job stability - although that might not be what you want. :)
C ++的优势在于为您提供稳定的工作 - 尽管这可能不是您想要的。 :)
#4
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.
我认为,考虑到你的情绪,它归结为你在写作时感觉更舒服。如果C ++是一种适合您的语言,那就这样做吧。它将帮助您进入代码并使其更容易完成。
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.
我也会注意保持未来。如果Win2K要求下降,那么如果用C ++编写,可能需要重写。它可能不会。在决定如何继续时,请记住这一点。
#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.
您可以使用.NET进行开发,但将编译器选项设置为以.NET 2.0框架为目标。如果操作系统在近期(或远期)升级,您可以升级程序以定位3.5框架。我会走这条路,因为它允许其他人更容易将来维护。
#6
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).
你考虑过德尔福吗?你可以免费下载Turbo Delphi,你可以很容易地编写针对Windows 2000的代码。使用Delphi,你会得到一个优秀的RAD(可以说比你在C ++中找到的任何东西都好......除非你使用C ++ Builder)。
Delphi creates native code, and has no runtime requirements.
Delphi创建本机代码,没有运行时要求。
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.
当然,缺点是如果您不了解Delphi(Object-Pascal),您必须熟悉一种新语言。但是,如果您了解C ++,您很快就会感受到德尔福的家。
#1
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).
在Windows 2000下运行的最后一个.NET版本是.NET 2.0 SP2。它确实包含System.Core.dll(它是.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.
答案是肯定的,如果你不打算使用.NET 3.0库(WCF,WF,WPF,CardSpace),你可以在Windows 2000下使用.NET 3.5 SP1。但是你有LINQ,LINQ to XML,LINQ to SQL。
The only thing you need to do is to deploy three core .NET 3.5 SP1 files:
您需要做的唯一事情是部署三个核心.NET 3.5 SP1文件:
- System.Core.dll
- System.Xml.Linq.dll (LINQ to XML)
- System.Data.Linq.dll (LINQ to SQL)
System.Xml.Linq.dll(LINQ to XML)
System.Data.Linq.dll(LINQ to SQL)
Disadvantages of this method (read carefully):
这种方法的缺点(仔细阅读):
- Not sure whether it's permitted or forbidden by the EULA (end-user license agreement)
- This scenario is not supported by Microsoft.
不确定是否允许或禁止EULA(最终用户许可协议)
Microsoft不支持此方案。
#2
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 :)
我想看看Mono(单声道项目)是否适合你。即在win2k上运行 - 如果确实如此,它将允许您将应用程序移植到MS .NET以及稍后的OS版本,如果需要在项目后期出现。任何.NET都比C ++更容易恕我直言:)
#3
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.
最大的区别在于,在您转向其他事情之后,您(或您的老板)更有可能找到开发人员来维护您的.NET代码。
C++ has the advantage of giving you job stability - although that might not be what you want. :)
C ++的优势在于为您提供稳定的工作 - 尽管这可能不是您想要的。 :)
#4
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.
我认为,考虑到你的情绪,它归结为你在写作时感觉更舒服。如果C ++是一种适合您的语言,那就这样做吧。它将帮助您进入代码并使其更容易完成。
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.
我也会注意保持未来。如果Win2K要求下降,那么如果用C ++编写,可能需要重写。它可能不会。在决定如何继续时,请记住这一点。
#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.
您可以使用.NET进行开发,但将编译器选项设置为以.NET 2.0框架为目标。如果操作系统在近期(或远期)升级,您可以升级程序以定位3.5框架。我会走这条路,因为它允许其他人更容易将来维护。
#6
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).
你考虑过德尔福吗?你可以免费下载Turbo Delphi,你可以很容易地编写针对Windows 2000的代码。使用Delphi,你会得到一个优秀的RAD(可以说比你在C ++中找到的任何东西都好......除非你使用C ++ Builder)。
Delphi creates native code, and has no runtime requirements.
Delphi创建本机代码,没有运行时要求。
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.
当然,缺点是如果您不了解Delphi(Object-Pascal),您必须熟悉一种新语言。但是,如果您了解C ++,您很快就会感受到德尔福的家。