Should I upgrade from Delphi 2009 to delphi XE?
As I don't use all the technologies, such as mobile, cloud computing, profiling, 64 bit, new database drivers, I don't need to change to the new XE?
What would change my mind?
Does the new Delphi IDE help me to write less code? Is the package management better?
Do you feel that the IDE gives more automation? And is it worth the upgrade?
I use Delphi XE all day every day, and I wouldn't use anything else.
It is the most stable version of the IDE that I have ever used. The compiler has had a huge amount of attention paid to it, and it works, and doesn't have the many internal failures, internal access violations, or other ways that compilers fall down, that every Delphi release since Delphi 2005 has. So the main feature that makes Delphi XE the best version ever is stability. It is even more stable than my old standby - Delphi 7. And delphi 7 is pretty stable, but working all day in Delphi 7, I did experience regular crashes, something that is finally a thing of the past, with Delphi XE. Okay, I've crashed XE's IDE a couple times, but it's rare.
The second reason is that it comes with great tools; A version of final builder, a version of CodeSite, and a version of AQTime are included. CodeSite was new to me with XE, but I love it, and now that I have used it I couldn't live without it. AQTime is an old friend of mine, and the version included with XE does most of the things that the full standalone AQTime will do, that I need it to do. The final builder version included, is also a huge time saver, especially if you have complex builds to do, including several Delphi application compiles, and an installer script to run, and perhaps other steps.
I like the code-formatter. I am not a big fan of Generics, but you can use them now, and they don't kill the compiler. I still prefer simple readable code, to a morass of generics, and I don't like the way that you do constraints with generics using IUnknown-style reference counted interfaces. Not nice, and not fun.
I don't use much of the database, cloud, or multi-tier application development features. I can't report on that aspect, but I do know that there's a lot more in the RAD XE product than any single developer, however intrepid, can probably even discover.
(Ethical Disclosure Footnote; I work for embarcadero. But even if I didn't, I'd still say everything above. Perhaps, I'd state it even more strongly.)
Does the new Delphi IDE help me to
write less code? Is the package
management better? Do you feel that
the IDE gives more automation?
No real changes there I think.
The area with possibly the most noticeable differences is generics. If you use generics at all then you should upgrade. The versions that followed 2009 have far fewer bugs and wrinkles in the implementation of generics.
In addition to what David said, there also is the new RTTI in Delphi XE which might make the upgrade worthwhile.
Besides the generics improvements, there are new features in the IDE. The addition of a code formatter, IDE Insight improvements to help you find things, integration of SVN, the reworking of the configuration manager, custom build tools, form designer changes, and more. There's also a bunch of new stuff in RTTI.
See this page for a list of what's new in XE, and go up a level from there to see a listing of what's changed specifically from 2009 to XE.
I think it's worth it...
Many bug fixes - they have focused alot on closing out issues. You cannot discount this...you'll never get any more fixes in your current version and the time saved by not having to work around just a single bug or two certainly pays for the upgrade cost if your time is valuable.
SVN integration is handy.
"Show In Explorer" from the project manager. (I don't know if it's just me, but I use this alot and it saves me time.)
If you like code formatters, there's a new option to format all sources in the project.
Debugger visualizers are kinda cool
Third Party Tools included: somewhat crippled, but very usable versions of: AQTime, Beyond Compare, CodeSite, IPWorks, Finalbuilder (depending on Pro/Enterprise)
Online help updated quite a bit
Can it help you write less code? Yes, as you can now rely on generics more due to many fixes from 2009, 2010 and XE. There's also some additional live templates added if that's what you are after.
What would change your mind? I'd say the bug fixes, additional Third party tools, and Online Help improvements make it a no-contest upgrade for the Pro edition. If you are going for Enterprise upgrade, and not using dbExpress, or other enterprise features, then it might be a little less convincing of an update depending on your budget.
The Help has been improved a great deal in XE - in 2010 it was a (bad) joke. 'Show in Explorer' is also great, although not enough reason to lay out that much money. Also much better support for REST, JSON etc. And XE just feels very mature and stable - I don't work for Embarcadero, but I use XE every day, as much as possible - unfortunately I am currently working on a project that uses components compiled for Delphi 5 without source code so I can't use XE for everything. There are some VS guys in my shop who think 'Delphi is Dead' and give me some grief - I am proving them wrong with XE...
Related
There is a code base in delphi 2006 with no development for last many years. If the development needs to be activated what are the options.
Continue developing in 2006. (Not sure of IDE support etc.)
Migrate to Delphi XE2. (Not sure of what it takes)
Recode it in Java.
It seems the second option is more viable but what it would involve to do that? I read some things on Unicode support and also not sure of graphics library support.
Just to put thing in perspective, I am a Java programmer all along with experience on C/C++. However I am trying to understand it more from the perspective of what is the least resistance path to go to market strategy.
Thanks in advance.
I cannot say anything about recoding it in Java. Depending on whatever the code base does, it might be a good option, given that you say you are experienced with Java (and, I assume, not with Delphi).
Regarding Upgrading to Delphi XE2:
Check whether any 3rd party components have been used.
If not, you will probably be able to upgrade to Delphi XE2 with very few changes.
If yes, check whether the source code of these components is already available.
If not, you will have to buy new licenses of these components (and this time take the license that includes the source code!) if you want to upgrade to Delphi XE2. If you are really unlucky, the company who developed these components has gone belly up. Then you are either stuck with Delphi 2006 or you will have to find a replacement for these components.
If you already got the component's source code, you might still want to check whether to upgrade them to Delphi XE2. It might save you some headaches. Upgrading well written components is not a problem for an experienced Delphi developer (I have done so countless times over the years), but might prove nearly impossible for somebody who doesn't know the possible pitfalls.
The only breaking change between Delphi 2006 and XE2 (actually it happened between Delphi 2007 and Delphi 2009) is the switch to Unicode strings. Switching an existing code base might be painless or a real pain in the lower back, depending on how well written it is to begin with and how it (ab)used strings.
Another option you have not yet mentioned, might be upgrading to Delphi 2007, which basically was more of a bugfix to Delphi 2006 than a real release in its own right. If I remember correctly Delphi 2006 packages worked with Delphi 2007 without even recompiling.
A year ago I moved from 2006 to XE (not XE2). This was quite painless. The biggest thing was unicode. But even that was relatively easy (in my specific case probably). Most is handled by Delphi in a correct way. Biggest problems were the import components, especially when character strings were used as byte strings, which in my field (music, midi) is the norm. There is a white paper on strings conversion on Embarcadero.
I only use components with source available. If you don't, you might have have to repurchase the licenses.
It is a long jump taking 2006 to 2011/2012!
But it is possible if you consider that:
You have to convert String variables using the new conversions methods ;
You have to check all the versions between 2006 and xe/xe2 to know how the libraries have changed, bacause some have been spplited, others merged, and a few deleted ;
You have to buy/download the upgrade (if any) of your 3rd party components.
If you do that 3 things, the applications will compile just fine.
It's always easier to upgrade the IDE than rewriting the code, if there's any complexity in code beyond trivial cases like "Hello, World".
Big road blocks in Delphi 2006 might be: old components without source code, unicode issues, possible use of obsolete technologies (BDE mainly), and possible some low level hacking, like using undocumented features.
You get old versions of Delphi free when you buy XE2 licence. However Delphi 2006 is not there. Delphi 2007 is almost same (but better). It may even be possible to use D2006 binary packages with Delphi 2007.
When rewriting, first task for you is to find out what the software actually does. Line by line. Then you need to duplicate that in Java, hopefully in Java style, and then you need to verify against the old software that the functionality is actually there, duplicated.
So, you can choose between complete rewrite or something between recompile and partial rewrite, if there's problem with old components.
Read also this, old but good text: Things You Should Never Do, Part 1
That said, you need business reason for rewrite, and someone willing to pay for it.
We currently use D2007 but are considering an upgrade to XE2. I can think of two "bigger" issues here - the Unicode step from 2007 to 2009 and the whole platform stuff from XE to XE2 (32/64 bit, VCL/Firemonkey with pointer sizes, unit namespacing and whatnot).
AFAIK we also get D2009, D2010 and XE if we buy XE2, so my idea was to tackle the upgrade in two steps:
First deal with Unicode. I guess the best way to do this is to upgrade to XE: We would have working generics etc. but no additional issues compared to an upgrade 2007->2009.
If step 1 is done and has shown that it works for our customers do XE->XE2.
What do you think? Should we do the whole upgrade in one step instead ? Or two steps but with a different intermediate version?
Edit: I'm aware that XE2 doesn't force us to go cross-platform (FireMonkey probably never will be an option for us). I just want to avoid related issues like "XE2 values of mrAll, mrNoToAll, mrYesToAll and mrClose" while fighting any Unicode related problems. And unit namespacing sounds like quite a hindrance if we were to make our units compatible with both D2007 and XE2 during the transition (or is that a bad idea anyway?).
I would just jump straight to XE2. Just because it supports 64-bit and FireMonkey does not mean you have to use them right away. Just write 32-bit code first and do your Unicode updates as needed, but be mindful of 64-bit when dealing with pointers, memory usage, etc to minimize the need for future migrations when you are ready to tackle 64-bit. Don't even worry about FireMonkey, as that is a completely new framework, so you would be starting from scratch anyway when you make that jump.
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I've been very happy with the Delphi IDE for programming in Delphi.
But I've heard about the Lazarus programming environment, and I've also heard that some Delphi programmers use it instead of the Delphi IDE.
What are the advantages that Lazarus has over the Delphi IDE, and why would, or should a Delphi programmer switch to it?
The answers are leaving me with more questions than I had before. There seems to be some disagreement as to whether Lazarus can or cannot be used as an editor in developing Delphi code. I guess I thought you could leave everything in Delphi and just change IDEs. The Lazarus for Delphi Users section of the Lazarus Wiki says:
The first thing to do when converting
a Delphi project
Having opened
Lazarus, you should go to to Tools and
then Convert Delphi Project to Lazarus
Project. This won't do everything for
you, but nonetheless will take you a
good deal of the way. Note that the
Lazarus IDE's conversion tools are
generally one-way conversions. If you
need to retain Delphi compatibility so
you can compile your project with both
Delphi and Lazarus, consider
converting your files with the XDev
Toolkit instead.
Because Lazarus is free is not a reason to switch, but does not penalize you in physical $'s for switching. (You will still have to invest your time to convert and learn. Time = $).
My as-much-as-I-understand conclusions from your answers as to why someone might switch from Delphi to Lazarus: obviously it must be providing something that Delphi currently can't. Currently that is multiplatform support and possibly 64-bit support. Delphi did have Kylix at one time, but not Mac support.
But with both of those and 64-bit promised soon by Embarcadero, you've answered my question by telling me there's no reason (at least for me) to switch.
Ok. This is an old thread, but could do with some updating. I stopped using Delphi, maybe a decade ago, largely because I had no choice. Having spent 5+ years working as a Delphi coder, I was now a student again and the prices for Delphi were simply outrageous. The problem with Delphi was never Delphi. Delphi was a genius system, but Borland (and later its successors) completely misunderstood the changing computer world. Microsoft was able to deliver a programming environment, that you could download for free, and its .NET environment was comparable with the VCL in all the important ways, meanwhile even a basic version of Delphi would break your bank or be plain out unavailable to student budgets. The end result is that with no new Delphi programmers coming on-line, it became a risky proposition for businesses to continue to use. Finally with the rise of linux, Kylix turned out to be a total trainwreck of an environment, not utilizing available UI toolchains and with a suspicious stench of Wine pervading it, topped off with an insulting attitude to GPL software that treated it as if it was shareware. Finally when Turbo Delphi came out many years later, it was unable to utilize the amazing resources available via sites like tories component sites. It was clear Borland had no respect at all for its coder ecosystem.
So Lazarus seemed to emerge out of all this, taking a very long time to gestate and seemingly aiming at some sort of analogue to Delphi 4, held by many to be one of the cleanest and neatest in the Delphi line. It complied to just about everything, its implementation of Object Pascal was spot-on, and most importantly it was free in all the senses that matter to open source.
However, it has had a long history of bugginess, and incomplete implementations of its controls. And this was bit of a deal breaker for me and many others.
With that said, I recently decided to download it, out of curiosity, and found that it's actually come a hell of a long way. The database components just work, although you might need to follow a few tutorials and chase some leads around to get them all up and running, and serious progress has been made towards iPhone and Android build targets.
I'm not sure I'm ready to deploy this to any of my commercial clients yet, but I'm going to give it another run with a personal project to put it through its paces, and if it does work, I think I'm finally going to be re-united with my first programming love, Pascal, and in a matter that lets me use my Mac to do the heavy lifting, whilst providing Windows and Linux builds.
So basically here are the facts on the comparison;-
Lazarus and Delphi are totally separate entities. Lazarus is NOT a cross compiler for Delphi, but has a certain degree of compatibility. Its more like GCC vs MS C++.
Delphi is more polished and likely more stable.
Lazarus provides a Delphi 4 like environment that old-hand Delphi coders will find very comfortable.
but Lazarus can be temperamental at times, and Delphi programmers need to understand that not everything in the latest and greatest Delphis will be there for them.
Delphi does Windows, and it does it very well (yes I know the new one has some cross compilation targets, but word on the street is, that it's a bit hacky and needs some time in the embacardo cooker before it's really there), whilst Lazarus complies to almost everything. The current target list is;- Darwin, NetBSD, OpenBSD, FreeBSD, Linux, Solaris, Win32, Win64, WinCE go32v2 (I think that's MS-DOS with 32bit extensions!), OS2, Netware(!), BEOS, Haiku(?!), QNX, wdosx(?), emx, netwlibc, Atari, Amiga, Palm-os, Gameboy advance, nds, MacOS, Morphos, Plus, there's experimental support for IOS and Android. On top of this, the thing can use widget sets from QT, GTK, GTK2, Win32/WIn64, Carbon, fpGUI(no idea), Cocoa or no GUI at all, with various degrees of implementation transparency.
Its an exhaustive list!
So Caveat Emptor. I strongly recommend Delphi coders download this and do some personal projects to get a feel for it, not on the boss' dime, but there's a lot of depth and substance to Lazarus, and it's potentially a vital tool in the belt for dealing with life outside the Windows crib.
Plus since Delphi's new masters still haven't learned a !##$%^&* thing about why Delphi fell from grace (Hint, make it affordable or free to hobbyists and students to learn and create custom components) , it's really the only budget option available. If Embarcadero ever wake up, maybe that will change. Until then, viva Lazarus.
The two main reasons for me are
1) Multiplatforms support (Linux, Mac OS X, Windows)
2) The price $0
Well a Delphi programmer cannot use Lazarus to write Delphi code because Lazarus is not Delphi. Lazarus is actually an IDE and a bunch of Delphi-ish class libraries for Free Pascal. But note, things like Delphi's VCL is not there, and to be perfectly blunt the IDE and debugging experiences in Lazarus are pretty spotty, however it is free, so that counts for a lot.
Bottom line, Delphi <> Lazarus. Use Delphi if you want a great IDE and debugger huge 3rd party support and tech suport you are targeting MS Windows, plus you are willing to pay for it. Use Lazarus (free pascal) if you want a Free IDE that supports multiple platforms and has a Delphi-ish syntax.
Maybe I'm just reading this wrong, but you seem to be under the impression that the IDEs are somehow interchangeable. That's not correct. Lazarus is built on top of the FPC compiler and is tied to it in much the same way that Delphi is tied to the DCC compiler. Also, they use different form description file formats. Delphi can't read LFMs, and Lazarus can try to read DFMs but it doesn't do a particularly good job of it.
FPC/Lazarus is very similar to Delphi, but it's a different dialect of Object Pascal and it would be a mistake to think they're equivalent.
I have a sound recognizing algorithm running on Delphi. When my superior asked to run it on WinCE I tried Lazarus. Pascal is Pascal. Lazarus is super. I have done it.
Algorithm is written in Pascal. I tried to convert. C# was prone to decompile and used different logic. Luckily I've found Free Pascal.
I have it running on WinCE on ARM. Thanks to all FPC collaborators.
edit: I have it running on Linux too.
Lazarus is cross-platform and free both as in speech and beer, while Delphi is neither. Lazarus does use a different compiler that compiles a language 99% compatible with Delphi, and provides a different visual component library, similar to but not compatible with Delphi's VCL.
Yes, Linux is installed on 70% of servers. It is powering the Facebook which has 400,000,000+ users. And you tell me to use Windows? You tell me not to use 64 bit?
I will use Lazarus. Until Delphi catches on.
Main reason for me - Delphi cannot currently compile 64bit apps and as such cannot see, read or write certain registry keys.
Well, I am one of those who uses Lazarus IDE to write Delphi source code.
I Like Delphi a lot. But use Delphi's editor is really a painful. I've tried VIM, and always dreamed to have an IDE like visual studio: simple, clean, and can split window horizontaly or vertically...
Finally I found Lazarus editor, way much better than Delphi's. So I use Lazarus write Delphi source, and RAD IDE is just for compile and debug.
For me :
64bit is alive (Delphi... yes may be, not and yes again, and finally no...)
Cross platform (Delphi not) By the way a lot of works still have to be done but it works !
FPC is a very good compiler
Community is cool and active
I don't have that much new to add, but I thought I'd relate my crossplatform experience. As far as putting together a cross platform application sketch fairly quickly, I find Lazarus to work very nicely. I've recently been using MonoDevelop of which there is much to commend, but the gui designer stetic doesn't seem as complete as the Lazarus GUI designer. Or is it the toolkit (GTK#) that seems to lack some bits? Before that, I've used Qt / C++ which also seemed to work out fairly well for crossplatform development, but I'm not real keen on C++, and Qt's signal/slot framework is a bit curious, but works well once you get your head wrapped around it. In sum, I find RAD work, and coding using Lazarus to be mostly joyful, besides, what a cool name for an IDE!
Cheers
Only CodeTyphon/Lazarus/FreePascal supports 4 CPU/OS hosts (Win32, Win64, Linux32, Linux64), and 16 CPU/OS targets (arm-WinCE, arm-Linux, arm-Embedded, arm-gba, arm-nds, i386-Win32, i386-Linux, i386-FreeBSD, i386-Haiku, x86_64-Win64, x86_64-Linux, x86_64-FreeBSD, powerpc-Linux, powerpc64-Linux, sparc-Linux, sparc-Solaris). More platforms are supported in Lazarus/FreePascal, but others are not yet integrated in CodeTyphon. One code to rule them all ;-). CodeTyphon is a powerful one click installation package for cross platform native Delphi like RAD/IDE based on Lazarus/FreePascal that eliminates painful cross platform setup. You can start coding just few minutes after the download, so if cross platform, 64 bits or price are key benefits for you then choose Lazarus over Delphi. Lazarus is highly compatible to Delphi, and I have converted few applications without much problems. It is possible to maintain code that compiles on both.
I am interested to re-evaluate Delphi 2010. The main issue seems to be the ascii to unicode conversion. Any tips or resources about this that you have found useful?
Many thanks.
Edit:
At this point my recommendation for those that want to upgrade would be:
http://www.embarcadero.com/images/dm/technical-papers/delphi-in-a-unicode-world-updated.pdf
Is WideString identical to String in Delphi 2009
What is the compiler version for Delphi 2010?
http://chee-yang.blogspot.com/2008/10/delphi-2009-unicode.html
GIF issues:
Note that Gif (by Melander) and Png (by Martijn Saly?) images are now incorporated in Delphi 2010. You will have to use a conditional in order to use the right GIF unit:
USES Windows, SysUtils, Graphics, blabla
{$IFDEF VER150}
, GIFImage, {Delphi 7}
{$ELSE}
GIFImg {Delphi 2010}
{$ENDIF};
Also you need to "fix" the PNG provided by Embarcadero:
http://talkdelphi.blogspot.com/2009_03_01_archive.html
Other things that you need to know is that you really have to backup your project before opening it in Delphi 2010. Delphi 2010 will change your DFM file even if you don't press the Save button. The form will lose data and it will not compile in D7.
UPDATE Delphi XE
I have finally purchased Delphi XE. Delphi XE proposes some new features but, unfortunately, quite few of them are not working at all (background compilation, UML modeling, code insight, etc). Other features have been downgraded (the help and, for example).
The IDE is also not as stable and fast as Delphi 7 and the toolbar has real problems (better don't customize the IDE). There is also a nasty bug where the IDE has 100% CPU utilization (see my other posts about all these issues).
I hope that in Update 2 and 3 they will fix some of the most stringent issues.
Anyway I think I upgraded too soon because now Embarcadero announced the 64 bit compiler, so probably I will have to pay again a lot of money to upgrade to the next version of Delphi in order to get that compiler. For those that are still thinking to upgrade to Delphi XE I would recommend to trial Delphi XE HEAVILY.
Conclusion:
Delphi XE brings LOTS of new features, but obviously you won't be using ALL of them.
The stability of the IDE is not better.
It helps you build more up to date applications (modern UI open/save dialog, application manifest).
Support for unicode.
UPDATE Delphi XE7
The difference between XE and XE7 was not that huge as the upgrade from Delphi 7 to XE. The IDE is as stable as before (lots of crashes and random access violations in RTL).
UPDATE Delphi Rio
Considering the amount ot years since the last update, I could safely say that the difference between XE7 and Rio is barely visible - except for those that are interested in cross platform apps (Mac, Android but not Linux!).
PROS
True high DPI support (really Embarcadero? After so many years?).
IDE does not crashes so often as it used to crash in XE7.
VCL themes finally (seem to) work.
Most stable IDE until now (still crashes if you open a project group with more than one project in it).
Almost full cross-platform support (you need to purchase the more expensive Architect version to get Linux). Fortunately, for me, this is a bit too late. The projects where I needed cross-platform were already started under Lazarus.
Upgrading the code was super easy.
CONS
Some HIGHLY advertised features like dark themes don't work at all!
The Insight still buggy: new language features (like declaring inline variables) not supported by the IDE (the code will have that wiggled underscore red lines). This issue will probably never be fixed.
Another super annoying IDE issue is that the compiler will still show the last hints/warnings/errors EVEN after you fixed them. Looks like the log data remains in some kind of cache.
Overall it is the most stable IDE until now, but still I wonder (especially if compared to Lazarus) if it worth that pile of money.
Conclusion over the years:
Delphi is such a nice and clean language. And the Delphi compiler speed makes any C++ compiler to look like a toy for kids.
I still feel ashamed people look down on me when I say that I am a Delphi developer. Delphi as a language is extinct now. Just look for Delphi jobs in Germany and only 74 positions are listed (but most of them are mixed with C# and others). C++ has over 1500 positions! Borland and Embarcadero helped a lot to kill Pascal. They do offer a free (even though crippled) version of Delphi now, but the damage was done. It is to late to resurrect Delphi now.
I think three main issues lead to this state:
Borland abandoned Delphi (Delphi lagged behind compared with other languages).
Embarcadero took over but disrespected the customers (over-buggy, over-expensive product).
MAIN ISSUE: The language was not promoted (at all) over the years. No sane company will spend thousands of dollars for a license of an already dying language. And the lack of a free license TOTALLY outcast the new generations of programmers.
Therefore, we are on StackOverflow, wondering each year if worth investing money in a new Delphi license.
Update
Finally, Emba released a free (aka Community) edition and boy you can see the effects.
For the first time in years, I don't feel ashamed to say in public that I am the user of Delphi (a dying language).
We have created a web page specifically for this very issue:
http://www.embarcadero.com/rad-in-action/migration-upgrade-center
There, you can find webpages, documents, webinar replays, etc. which all cover the issue of migration.
The first thing people say is "I have a huge codebase, and migrating to Unicode will take forever" and almost without exception they discover that "forever" really is a much shorter period of time than they originally thought and that the new features of Delphi 2010 make it all worth it.
The biggest problems are with 3rd-party libraries and VCL. If they're not on D2010, it can be painful. The Unicode issue comes up if you are doing calculations with the length of strings or PChar arrays, assuming one byte per character. You can usually get away with treating everything as old-style AnsiString / AnsiChar. But then you don't get the benefits of Unicode. If you don't have anything that would be hard to do in Unicode, just do everything in Unicode and you'll be much further ahead than if you have to worry about switching back and forth.
Converting code to unicode doesn't take that much time in itself as long as you didn't do anything "funny" with your strings. I converted close to 1m lines of code + the database in less than 2 weeks. The guys at codegear did a very good job at doing it a lot simpler.
Your code might recompile in D2010 without any changes (But with quite a few tons of hints/warnings).
The worst problem from the conversion comes from calls to Window's API that were incorrectly done. For exemple, the function GetComputerName that ask you the size of the buffer in TChars(as specified by the API). In Ansi, TChar = 1 byte, so Length = SizeOf. In Unicode, it's not true anymore. Worse, the call to the API might not fail. It will just overwrite some valid part of memory and will crash just much later.
Oh... And there is also those slight differences between Ansi and Unicode in Windows API. For exemple, the lpCommandLine of the CreateProcess is read-only in the Ansi version, but read/write in the unicode version. So using a constant as parameter worked fine in Ansi, but will crash in Kernel32.dll in Unicode.
Overall, it depends a lot on the quality of the code you are working with. Bad code might be very hard to port to D2010. Good code should be pretty easy.
and read the resources that Nick Hodges linked to, they are pretty helpful.
For Unicode conversion issues, your best bet to see the problems people have encountered and what others have done is to get Cary Jenson's White Paper: Delphi Unicode Migration for Mere Mortals.
Also I'd highly recommend Marco Cantu's "Delphi 2009 Handbook" that describes all the changes in the Major 2009 release that includes Unicode and Generics and more. Much of his Unicode material from that book is in his White Paper: Delphi and Unicode.
We have upgraded from Delphi 7 via Delphi 2007, 2009 and now 2010! The following are the biggest issues we have found.
Threads have changed, with Resume and Suspend being deprecated.
Unicode
The structure of projects have changed and are not backwards compatible
The structure of dfms have changed and are not backwards compatible
Hope this helps.
I agree with Chris - the biggest problem in migrating our code to 2010 was getting all of the 3rd party libraries working. A number of them needed minor source edits here and there and had to be installed from the modified source. Still, that said it wasn't more than a day or so of getting things sorted out.
The only other problem we've had moving to 2010 involved one small section of code that went buggy because of a change in the way 2010's ProcessMessages works. It was an old piece of code that probably shouldn't have been written the way it was to begin with (ProcessMessages and Sleep() inside a while loop waiting on an OPC variable change). It worked in 2007 but in 2010 it somehow devoured system messages and locked up the OPC server. For us it was a small fix, but like Ken said it will likely depend on the quality of code you are porting. 2010 seems a bit less tolerant of poor practice and ugly hacks.
View this Embarcadero webinar on how to migrate from older editions of Delphi with some stories of what to look for and how to update your code (including tools and resources to help you along the way), on this link: https://community.embarcadero.com/blogs/entry/migrating-delphi-case-studies
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.
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
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 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.
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.
"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.
See here. It can confuse the things when coming to D2010.