Porting from D5 to D2009 – prologue

I have to admit I am looking forward to looking back at this project.
300.000+ lines of code, using numerous third party components, a sophisticated in-house ORB sitting on top of BDE with several designtime components, built-in version control for SQL statements and tight Oracle integration. Dozens of input forms and hundreds of reports.

I am not quite sure where to begin…

Should I convert to D2007 first, or go directly for D2009?
Advice would be appreciated.

9 thoughts on “Porting from D5 to D2009 – prologue

  1. If you have all of the 3rd party components in Delphi 2009, then I would skip 2007. The largest piece to overcome would be the string to unicode, but I have yet to have a serious problem with any of the code that I have migrated.

  2. I agree with SKamradt, but if you open it in 2009 and find you are dealing with a lot of issues in addition to unicode then it might make sense to step through 2007 first so you can fix everything but Unicode first. I generally like having milestones where it is complete and working in the process.

  3. Definitely skip 2007 – otherwise you would need to convert some parts twice – especially if there are 3rd party components. Also, it may be easier to rewrite some parts of the code instead of fixing everything, and the new generics (e.g. TList) may come in very handy when doing that. You need D2009 for those.Instead of spending time on D2007, I suggest that you spend time on refactoring your app inside Delphi 5, so that you can compile it in smaller parts. When you have made a sub-project that only compiles 50,000 lines of code, it is much easier to make that compile with Delphi 2009. Unit tests are also a very, very good idea, and all this can be done inside Delphi 5.

  4. Thank you for your feedback, guys! One part that is particularily worrisome is the designtime components. There was a fundamental change in approach between D5 and D6 if I remember correctly, splitting design code and use code more rigorously?Anyone know of articles that share knowledge on the particular aspect of design time component migration?Fortunately, all my third party libs are (or will shortly be) available for D2009.

  5. I could be looking to convert from D6 to D2009 in the not so distant future so I’d be interested in how this goes for you. Any chance you could put some posts together telling us your pitfalls and successes?

  6. We migrated a 1.5+ million line codebase from D5 to D2006. We split it up in several steps: (1) upgrading or replacing all third party components that weren’t compatible with D2006, (2) porting or replacing all in-house components to make them compatible with D2006, and (3) porting the source code itself.

  7. Thanks for the link, Loïs!Jason, I plan to keep a work log on this blog, keeping track of how I progress and where I stumble (or fall flat on my face), as well as questions that arise and their solutions.