How to choose a migration path from Delphi 2007

I have been working with a team for a larger application since Delphi 2007. It uses a more extensive structure to access data. Both applications and frameworks use String as the data type for strings. I started changing the code in the framework to support Delphi 2009 strings, see my previous questions about this.

Now I see two alternatives:

Alt 1 . Continue to use the string as before. This is perhaps the cleanest solution since the infrastructure will support Unicode. But the code within the framework needs to be changed a lot in order for this to work. This requires a deep understanding of internal algorithms within the framework. This is also a greater chance of introducing new errors.

Alt 2 . Replace String with AnsiString and Char with AnsiChar. This makes the decision easier, as well as how I start to change the code (but then I start to think and ask this question ...). The downside of this is not Unicode support. Unicode support is not a requirement since it worked before then, but it is nice to have it. It may also be useful in the future. Another problem is that the application must send Ansistring variables as parameters in the methods for the framework instead of String. There are thousands of challenges to change ...

So I don’t know right now. Both options require a lot of work, but Alt 1 is probably more risky and time consuming. What I want from this forum is reviews and comments, because I think I'm not the first to have this problem.

- . , . 26 .

Delphi 2007 40.011.600 , 4:15 . Delphi 2009 72,015,580 , 4:45 .

GetHeapStatus.TotalAllocated.

, , .

, 500 . , . , AnsiString.

+3
4

"alt 2", Unicode , Unicode.

: ; Delphi 2009+ Unicode.

: 20100125

"alt 2", Delphi, .
, Andreas, .

CodeRage 4 Unicode .
, .

, .

-

+2

Delphi . .

, " ansistring" , , . TStringlists, tstringstream .. .

Datasnap, Indy .

, . . XML, , . , unicode .

+3

2007 → 2009 (200 . ). , "" , , char .., . . opt1.

, .. .. . → ansistring, char → ansichar .. .. - , , . , opt2 .

, Delphi 2007 , , , 64- .

+2

, Unicode, VCL , , Unicode. .

+1

Source: https://habr.com/ru/post/1729772/


All Articles