Delphi 2010或2007用于升级Delphi 3项目?
我刚刚收到一项任务,要将我在 1999 年编写的旧 Delphi 3 项目升级到较新版本并添加功能(我之前在相关问题中讨论过这一点 此处 和
我现在正在考虑是否将应用程序升级到我现有的 Delphi 2007 副本,以避免 Unicode 复杂化。该应用程序在美国的一家公司运行,并且严格遵守单个州的要求,因此它不会从 Unicode 支持中受益。
我的问题是:处理 Unicode 问题的额外麻烦会超过使用最新版本的 Delphi 的好处吗?您可能会认为我没有使用 Unicode 的经验。
I've just received an assignment to upgrade an old Delphi 3 project that I wrote in 1999 to a newer version and add features (I previously discussed this in related questions here and here). I was assuming that the appropriate route would be to first upgrade my development environment to Delphi 2010 and then port the application.
I'm now considering whether to upgrade the application to my existing copy of Delphi 2007 instead in order to avoid the Unicode complications. The application runs at a single company in the United States and is tightly bound to requirements of a single state, so it would not benefit from Unicode support.
My question is: would the additional hassle of dealing with Unicode issues outweigh the benefit of using the most recent version of Delphi? You may assume that I have no experience with Unicode.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(6)
为什么“升级”到不是最新的版本,它只是保证更早的“下次升级”。
我对 Delphi 2010 非常满意,我建议移植到该版本,除非您使用 D2010 不可用的第 3 方库
why "upgrade" to a version that is not the latest, it just guarantees an earlier "next upgrade".
I'm very very happy with Delphi 2010, I recommend porting to that version unless you use a 3rd party lib that is not available for D2010
您应该在 D2010 试用版上尝试一下(升级版),并给自己一天左右的时间来感受由此产生的并发症类型。一般来说,如果您没有使用大量的 PChar 进行指针运算,并且没有使用字符串的子范围,例如 Code[1] := 'A' 等,则应该很少或没有升级问题。除了 unicode 升级之外,D2010 IDE 更好用,而且看起来比 D2007 更快。
You should try it (the upgrade) on a D2010 trial, and give yourself a day or so to get a feel for the type of complications that result. Generally, if you didn't use a lot of PChar for pointer arithmetic, and you didn't use sub-ranges of strings, e.g. Code[1] := 'A', and so on, there should be few or no upgrade issues. Aside from the unicode upgrade, the D2010 IDE is much nicer to use, and seems faster than D2007.
D2007 可能更容易升级,因为您不需要更改代码即可与 Unicode 一起工作,并且如果您的代码不需要大量 PChar 和其他 ANSI 专用函数,则它可以在 Delphi2010 中工作,而无需大量工作。
但如果你有时间和资源升级到Delphi 2010,这将是更好的选择,因为Delphi 2009及以后的版本迟早会成为标准版本。
此外,D2010 中的 IDE 生产力更高,此外还添加了新的语言(如泛型、匿名方法和其他语言),如果您要重写代码的某些部分,这些功能可以使您的代码变得更好。
D2007 may be easier to upgrade, because you it will not require changes of your code to work probably with Unicode, and if your code doesn't require a lot of PChar and others ANSI dedicated functions, it may work in Delphi2010 without a lot of work.
But if you have time and resources to upgrade to Delphi 2010, it will be better options, because sooner or later version from Delphi 2009 and later will be the standard versions.
Also the IDE productivity is higher in D2010, beside new language additions like generics, anonymous methods and others which make your code better, if you going to rewrite some sections of it.
他们在 Delphi 2009 中实现 Unicode 的工作非常出色,以至于大多数不使用字符和字节进行转换的程序都可以毫无问题地进行转换。
需要注意的是,只要您不使用任何第 3 方软件包。如果是的话,您应该升级它们。如果他们没有升级并且您没有他们的源代码,那么您最好不要使用 Delphi 2010。
但如果可能的话,我会进行跳跃。我做到了,我很高兴我做到了。
They have done such a good job implementing Unicode in Delphi 2009 that most programs that do not do tricks with characters and bytes convert over with no problem.
The caveat is as long as you are not using any 3rd party packages. If you are, you should upgrade those. If they don't have upgrades and you don't have their source code, then you might be better off not going to Delphi 2010.
But I would make the jump if at all possible. I did and I'm glad I did.
“这取决于”
这取决于第 3 方控件的数量以及这些控件的当前状态。 (市场上还有 2007 年和 2010 年的更新吗?)
这取决于代码大小和代码质量。如果你有一个庞大的、管理松散的代码库,那么通往 2010 年的道路将更加艰难。
它还(很大程度上)取决于项目的输入/输出……你是否从文件/数据库/通信中读取内容?他们对 Unicode 有何反应,或者您能否轻松缩小所有这些接触点以确保正确处理?
另一个主要依赖项是应用程序的生命周期...如果您打算长期支持此应用程序,“采用 Unicode”现在可能会为您提供更好的服务,因为最终他们将停止销售 2007 年,您将被迫使用它。
我拥有 2009 年并用它构建了一些小型应用程序/实用程序,但主要工作仍在 2007 年、2006 年、D7 和 D5,具体取决于项目。
"That depends"
It depends on the number of 3rd party controls and the current state of those controls. (Are they still on the market with updates for 2007 and 2010?)
It depends on code size and code quality. If you have a large, loosely managed code base it will be a harder path to 2010.
It also depends (largely) on project input/outputs... are you reading from files/databases/communications? How will they react to Unicode, or can you easily narrow down all of those touch points to ensure proper handling?
One other major dependancy is the life of the application... "Going Unicode" now might serve you better if you are going to support this application over the long term as eventually they'll stop selling 2007 and you'll be forced into it.
I own 2009 and have built minor applications/utilities with it, but the main work is still in 2007, 2006, D7, and D5 depending on project.
请参阅此处。到了 D2010 时,事情可能会变得混乱。
See here. It can confuse the things when coming to D2010.