Why Delphi Help does not come with examples anymore? - delphi

When I worked with Delphi 5 I always pressed F1 on a method I did not knew how to use. The Help system explained what it is, what is does and gave an example on how to use it in a simple code. After that I installed Delphi 2006 and bammm! No more code examples.Anyone knows why give up on something so important?

(Personal opinion based on observation and analysis of a long time Delphi user, as I am not from Delphi team. If you do have any evidence to support or challenge, please leave a comment.)
Delphi 5/6/7 help system was built upon a Microsoft Help system called WinHelp.
Due to Microsoft's decision to make WinHelp obsolete, all previous help materials become "impossible" to migrate (need more info from Embarcadero to support this statement). The new help system in Delphi 8-XE 3 was a completely new system. Porting contents and formats from the ancient platform to the new one becomes a huge burden and a very time consuming process, which takes many years to accomplish.
Delphi 2006 was an "intermediate" release, where its help system is half baked. You have to use a later release (such as the latest) to get F1 working as you wished. Or alternatively, use the online version, such as
http://docwiki.embarcadero.com/RADStudio/en/Delphi_Reference

Related

migrate huge old Delphi application to newest Delphi version

I have an old Delphi application and i want to migrate it to the newest Delphi version. The problem is that the application is huge and migrating whole app at once would be too complex. I wonder what is the best approach to do this... Maybe form by form, placing a form into a dll and then using older forms in the new Delphi app and replacing them one by one (after clients confirm one form is working ok to continue with the next one). Not sure if this would be possible at all...Any other ideas?
I presume that based on your comments you do not have comprehensive test cases. In that case, you are simply in a world of pain, and there is nothing that will truly mitigate that. Without test cases, any approach you take will generate errors and bugs that will take you quite a while to catch them all. Build that into your expectations. In fact, with those as your expectations then you need to schedule a large testing phase and maybe that is a good approach. Upgrade all at once and test over the course of a few months.
You could first identify all 3rd party components that will eventually be needed and upgrade them to the latest version one at a time. That way you can at least identify bugs in a controlled manner per 3rd party component. Again, since you are relying on manual testing, this also will be error prone, but maybe you can focus on areas that use the upgraded component preferentially.
here my advice.
Before you start migrate, do a refactoring of your existing source-base.
1.) Remove un-used stuff.
2.) Try to move as much as possible to standard delphi components.
3.) Remove "un-used" units from your uses-statements.
4.) If needed, try to do some layering (App-UI,App-Logik,DB-Layer,Libraries)
5.) Look for 3rd-Party Components/Libraries, which might be not needed anymore in the latest Delphi Version, because the functionallity is now included in Delphi. If you spot such components/libraries, try to encapsulate them.
Now you have a new version of your software (still in the old delphi). Test it as exact as possible (Unit-Tests would be perfect).
If this is done, then you start to migrate to newer Delphi. I recommend to do it in one go (instead of dll and one by one).
I do not think there is enough information presented to give you specific advice.
My answer would be to bring in knowledgeable experts to look at your code, talk to your staff, look over your documentation and tests, and then present you with smart options. This can likely all be done via Zoom/Skype online. If you think about how much money you are going to end up spending on the conversion, and how much money you will spend on fixing problems because you went off in the wrong direction (and how many customers you could lose due to bugs/performance issues) this would be an extremely cheap investment.
There are a number of firms with Delphi experience that could help you. (I do not work for one and this is not an ad.) There are some well-known Delphi consultants that would likely have some free, or small flat-fee type, initial conversation.
If you are using a version before the Unicode switch in Delphi 2009, there are a number of online resources to assist. Delphi Conversion Unicode Issues
If you want some real-time advice and chatting about specific issues, check out a Telegram server dedicated to Delphi programming with nearly 800 members. There are nearly always some Delphi experts online answering questions. https://t.me/delphidevelopers You should be able to get some consultancy contacts from that server.

Is Lazarus a good alternative for learning Delphi?

I'm a teen who has been programming since 8 years old, so I know what I do.
I want to take a look at Delphi Windows development.
The problem with this, is that Embarcadero's Delphi is really expensive, and I can't afford it.
I wanted to know if Lazarus is a good alternative, now for learning and hobby, but in a few years for working.
If I learn Lazarus now, would I know Delphi also ? Do I need to learn Pascal first ? Any good Lazarus books ? If I learn Lazarus from a Delphi book it's ok ?.
Thanks.
Some things to be aware of:
The component library for lazarus, the LCL is similar in many ways, to the VCL library for Delphi, but there are differences, the biggest being the many components in the VCL that are not in lazarus. As a means of learning Delphi programming, this seems to me to be the biggest shortcoming.
The IDE for Lazarus is similar in many ways to the Delphi 7 IDE (and older versions) and looks nothing at all, and works nothing at all, like modern Delphi IDE versions. So your learning of Lazarus would be somewhat transferable to the now-ancient version Delphi 7, but wouldn't be of much use in knowing your way around the delphi IDE. Installation of packages works completely differently too. Delphi has true support for packages, whereas lazarus rebuilds and relinks itself in order to add more "designtime components" to itself.
The base languages are also almost identical, but I would expect to find some strange differences. There is some brief description of the differences on Wikipedia.
I agree with Kico; The delphi starter edition is not expensive.
there's a version of Delphi called Embarcadero Delphi XE Starter Edition, which have a very good price (free I guess).
I can't recommend Lazarus as a good option for learning Delphi because besides the languages are basically Pascal, they have some differences which could confuse you.
Here is the link for the old Turbo Delphi project (which became the Delphi XE Starter Edition) where you can download your copy.
There's already lots of views on this so take your pick. Mine for what it's worth, is that learning a language and more specifically HOW to program is the most important aspect. I know many skilled programmers who can and do use a multitude of languages - C, C++, Java, Ruby, Python, PHP, Delphi and so on. They all say to me that once you learn and are good at the fundamentals of a while loop, a for loop, and so on, applying that to a new language is easy enough.
I have not produced loads of software but I've achieved more in the last year using Lazarus and Free Pascal than I ever did with any other language - Python and Delphi included! I can easily create cross-platform GUI's that run on all OS'es with powerful procedures that I couldn't make with Python and\or Delphi. I am not saying they couldn't be made with those languages, but I was able to make them easily and quickly with Laz+FPC.
So, personally, even if I could afford to buy Delphi, I'd use Lazarus. I don't see that Delphi offers me, at my level, anything significant over and above Lazarus. So at your level and age, I'd say learn everything you can and when you outgrow Lazarus (if you ever do) move on to DELPHI. The interface transition will be easy enough once you know the language.
If you are still in school, you should check to see if there are educational discounts for Delphi
Primarily I think that you should let yourself be guided what your immediate surroundings use. The people on the forum you intend to frequent, friends, coworkers/students, whatever they use should be an important factor in what you do. Since they are the ones you will ask questions, exchange source etc.
They might be using older versions of Delphi, Lazarus or the newest of the newest Embarcadero version. E.g. for my work, I visit electrical engineering departments a lot, and they uniformly use a Delphi 6 or 7. And if not, usually older rather than newer.
If you are gearing up to do a bit of side jobs with Delphi you have a problem. You can buy starter to learn, but as soon as you start asking money for it, you have to acquire a full license(*), and the starter license is money lost. Specially since Embarcadero recently limited the period that old versions might upgrade, you might not even get a discount on the full version because of an older starter purchase in a few years.
Besides being free, Lazarus, for educational purposes has one big advantage: the number of versions in active use is usually limited to the last two releases. This reduces versionconflicts and at worst versionitis is only temporary. This means all your peers will more or less use the same version, while with Delphi they might be scattered over more than 5-6 versions.
And of course updating lazarus is also free :-) (which is important to consider in a multi year planning, the same people urging you to buy now will urge you to get the latest and greatest in a few years too)
Personally, I think that Lazarus is fine for the initial learning and that differences that really would be a stumbling block are much further down the track. And you get a VCL/LCL path to other platforms. You can always get a Delphi version later when plans are more concrete. (either to find employment, or if you start being a self employed programmer)
(*) luckily, if I understood it right, the starter edition now allows non commercial use in foundations.

should I move to the new Delphi XE Starter?

I am a Turbo pascal/Borland pascal/Delphi developer, since 1987. I currently only use Delphi for maintaining old tools that I (and some friends of mine) use privately. Unfortunately all my professional codes have already been ported, some even with my direct involvement :) to other development languages and environments, sad. OK, sorry for this digressive introduction. Let me get to my question.
I currently own Delphi 7 professional. It was an expensive move, never worth what it costed, just for my hobbyist usage.
Now, this XE Starter edition has appeared. At 149€, it looks like a good deal. It seems that it comes with almost everything I use now, and with some things I miss; unicode and generics, specially.
Do you know if there is any hiden (bad) surprise in this offer? So, should I stay or should I go?
What are in your opinion the pros and cons of such a move?
thanks.
The worst "cons" of Starter is absence of VCL sources (not mentioned in feature matrix, but discussed in blogs
If you're a hobbyist using Delphi 7 you might as well try to switch to FreePascal. Comes with full source :-)
Given the missing VCL source AND no command line compiler, Delphi Starter Edition is a NonStarter IMO.
The only real downside is that Unicode migration can be a significant hurdle if you're using a lot of third-party components, especially if they haven't been updated since the Delphi 7 days.
Other than that, there's no good reason not to update, and plenty to be gained from it. Generics, Unicode, enumerators, extended RTTI, newer OS support, touch, etc, not to mention an upgrade path to future releases.
TClientDataset is also missing.
Could be an issue for some of you.
Only you can determine which features are important to you. Please refer to the Delphi XE feature matrix (PDF). It tells you what features are in each edition of Delphi XE. You should also look at the "What's New" document, which also includes links to what was new in the previous three versions (which, even then, still doesn't get you all the way back to Delphi 7).
As opposed to what Mason says, I'd say the real "upside" is that it will have Unicode strings.
If you want to handle Unicode in your hobbyist programming, then yes, do the upgrade. That was the real reason why I upgraded from Delphi 4 to Delphi 2009.
Generics are nice, but not essential. Theoretically, Delphi 7 will be able to program most-everything you'd want, except for Unicode.
The XE versions have a much nicer IDE, Unicode, and support for Vista and Win7. I'd go for it if I was still on Delphi 7.
If you mostly want to use it for hobby purposes then staying with an 8-year old development environment and a language that doesn't have a lot of new features is not a good move.
If you want to learn new technologies (as applied to Delphi) or even want to apply knowledge you acquired from other environments to make your life easier in Delphi world then XE is a good choice (as you mentioned Generics, Unicode, extended RTTI, Touch, etc goodness).
Now, is Starter a good choice? Depends on your needs. Check out the feature matrix (as suggested) and decide for your self.
But as the language/IDE goes, then definitely go for it.
If I had not already upgraded to Delphi XE, I would certainly go for this offer, even without source code. I am also a hobbiest, and for me, the upgrade cost for professional every couple of years is worthwhile. There are a lot of more expensive hobbys, believe me.
And what about 64 Bit code. I think even the XE does not compile programs for 64 bit which means limitations exist for max 4GB for programs and etc etc. Let's hope they release a 64 bit version soon for XE.
Don't do this mistake.
Wait for a stable version to be released.
See this: Brand new installed Delphi XE freezes without reason (it is QC 90864 Delphi bug)
In my opinion XE2 is appealing because OSX support and 64 bit compiler but such support comes only in pro and upper editions.
So, unless you have $1000 to spend (pro edition), starter could frustrate you because the lack of features that you already have with Delphi 7.
Regards.

Upgrade from Delphi 2007 to Delphi 2010?

What should I worry about if I move to Delphi 2007 to 2010?
I've checked this article and there was a lot of interesting stuff but not precisely for this jump that I need.
To clarify my question and situation:
I have all 3td party components' code.
I will need the unicode, but not this year.
I need win 7 support - themes, form resize problems and etc.
I will be happy to have a decent help system.
Is ADO (dbGO) improved?
What headache to expect?
Thanks!
I will be happy to have a dissent help
system.
Sorry for you, the help content of Delphi2010 is better than Delphi2007, but far away from Delphi7.
There are many resources about unicode migration, and it is very easy to find.
I will just insist on 3rd party libs which is the difficult part.
You have the source code, good, but considering fixing unicode relates issue inside these components is very ambitious !
My advice: Check the compatibility of your 3rd party libs, check your code compatibility - fix all warnings, follow this good white paper from CodeGear : Delphi and Unicode
http://edn.embarcadero.com/article/38980
I need win 7 support - themes, form
resize problems and etc.
You already have themes in Delphi 2007. Not that 2007 is at 100% prepared for Win7 but themes is what important for most users so this is IMHO not argument to upgrate.
I will need the unicode, but not this
year.
If you plan to use Delphi 2011 and release Mac version of your software, why not do it step by step and take Unicode headache (?) today? I am not sure of answer, just worrying :-) I am in this situation, already have license for Delphi 2009 but still unused because of Unicode so I am in 2007.
A "Beginner" approach to Delphi 7/2007 (ansi strings) ports to 2009/2010 (unicode strings) is to blindly search and replace ALL occurrences of String and replace with AnsiString, similarly, blindly changing all instances of Char to AnsiChar. This quickly reveals itself to be painful, and stupid, and wrong. Thus chastened, the user (without reading the transition guides published by Embarcadero, written by Nick Hodges) will retreat and lick their wounds, and consider sticking with Delphi X forever (where X is in the set of [7,2007,myFavouriteVersionHere]).
The second approach is to download already-updated versions of any components you need, and only update the components you really can't find any newly updated source code for, yourself, and then proceed to updating your application code.
I find that it is worth doing this, if you either sell your application for money, or if you rely on your application to be of some usefulness to you, or your company. It is not only a question of upgrading to handle compiler differences, but upgrading, as you say, to handle platform differences. And not only the platform differences that you are mentioning above, but ones you didn't mention, like UAC, and changes in user-permissions on files and folders, and other priveleges. Does your application require the ability to write to folders inside C:\Program Files, and other things, etc? Those need to be fixed.
If your application is a typical "ball of mud", developed incrementally, and without an elegant object oriented design, and if (as is typical) your app doesn't even really meet the recommended specs that Microsoft published as part of Windows XP, in 2002, the you really have some catching up to do.
If it's all too much for you, you could consider contracting the work out. An expert could probably port the application from an old delphi version, to a new one, in a few hours, and train you how to do the maintenance from that point forward.

What are good arguments to convince management to upgrade to Delphi 2009 / 2010?

We have a medium-to-large size application. One version runs on Delphi 6 and another one on Delphi 2006.
One argument would be support for Unicode. We need that to cater to Customers around the world.
Other things I have read about are: better IDE (stability, speed), better Help and some cool additions to the language (e.g.: generics)
What about third-party components? We use DevExpress, DBISAM and many others. Are these already ported?
Touch/Gestures sound cool, but we have no use for that in our application.
Better theme support (eg., TStringGrid/TDBGrid now support themes).
Support for Windows Vista and Windows 7, including support for the Direct2D Canvas in Win7 and the Touch/Gesture support you mentioned.
Improved refactoring, including support for refactoring generics.
Built-in source code formatter.
IDE Insight allows you to find things in the IDE itself.
Enhanced RTTI.
Improvements in the debugger, including new custom data visualizers and the ability to create your own. There are two included with source (one for TDateTime and one for TStringList). Also better support for debugging threads, including the ability to name threads for debugging and set breakpoints on specific threads.
The ability to add version control support to the IDE via interfaces. This will allow version control developers to add support directly in the IDE itself.
The help is much better than in previous versions. It's been completely redesigned again, and is much more comprehensive and complete. There's also an online wiki-based version (used to generate the help itself) that you can add or edit.
Background compilation allows you to continue working while you're compiling your project.
As far as third party controls, that's up to the specific vendor; you'll have to check to see if Delphi 2010 versions are available for each of them individually. (You might check the Embarcadero web site, though, to see if they have a list already available; I seem to recall hearing of one... Ah, yes. Here it is. )
Last upgrade for old version
With old version of Delphi (before Delphi 2005), you have only before january 1 2010 to upgrade.
After you will have to buy a full version.
Productivity
http://www.tmssoftware.com/site/blog.asp?post=127
Purely as a reactive measure. Lets say that there is a new feature in the latest version of a yet to be released operating system. Lets say that this feature breaks certain features inside your application. IF there was to be a global fix for it, it would most likely not be placed in older versions of the compiler, but the newer versions which "officially" support the new operating system. The largest problem about waiting too long is that when such a measure is needed its generally at the zero hour when sales are at risk.
Upgrade NOW, and help prepare your application to be more reactive to future changes.
Don't convince him for a Delphi 2009/2010 upgrade, Do it for a Software Assurance.
The refactoring tools and overall
speed and stability of the IDE will
make the development team more
productive.
Working with the latest tools will make it easier to recruit top talent.
The IDE is definitely a step up from Delphi 6 and/or Delphi 2006.
If Unicode is important to your customers then Delphi 2009/2010 is a clear option. But if Unicode is important to you, rather than your customers, then I'd be careful.
Unicode is not "free". If your users/customers have concerns w.r.t memory footprint and/or performance, and/or your application involves extensive string handling, then Unicode exacts a price that all your customers will have to pay, and for customers who are not themselves concerned with Unicode support, that price comes with zero benefit (to them).
Similarly if your application sits on top of a currently non-Unicode enabled database schema. Migrating existing databases from non-Unicode to Unicode is non-trivial, and if you have customers with large production databases, incurring downtime for those customers whilst they migrate their data stores is something you should consider carefully.
Also you will need to be very aware of any interfaces to external systems - your code will unilaterally "go Unicode", and that may adversely impact on external interfaces to other systems that are not.
In such cases you would do well to tie the transition to Unicode with other compelling feature improvements and benefits to make the transition compelling for other reasons.
Also, if you genuinely have customers with a real need for true Unicode, then the transition is not as simple as recompiling with the latest/greatest compiler and VCL. True Unicode support will involve a great deal more work in your application code than you might at first appreciate.
Of course, having a Unicode capable compiler/VCL is a crucial component, but it's not an answer on it's own.
The Unicode change has a significant impact on 3rd party components. Even if you have the source to your 3rd party code you may find yourself facing Unicode issues in that code unless the vendor has taken steps to update that code in a more current version. Most current vendor libraries are Unicode by now though I think, so unless you are using a library that is no longer supported by the vendor, you should be OK on that score.
I would also exercise caution when it comes to those "cool" language features such as generics. They sure do look cool, but they have some seriously limiting characteristics that you will run into outside of feature demonstrations and can result in maintenance and debugging difficulties as the experience of the community in working with them is limited, so "best practice" has yet to emerge and the tool support perhaps hasn't yet caught up with the uses to which those features are being put in actual code.
Having said ALL that.... Since you cannot realistically choose any version other than Delphi 2010 to upgrade to, then if you are going to upgrade at all then you have to bite the Unicode bullet and will find yourself presented with lots of tempting language features to tinker with and distract you. ;)
And now that Embarcadero are imposing a more draconian policy w.r.t qualifying upgrade products, you will have to get off of Delphi 2006 if you wish to qualify for upgrade pricing for Delphi 20*11* onward, whether you decide that 2010 is right for you or not, otherwise when the time comes to upgrade to Delphi 2011 you will find yourself treated as a new customer, and if you thought that upgrade pricing was steep, check out the new user license costs!
D2006 was an awful version of Delphi. It's worth upgrading just to be rid of all the memory leaks and random IDE crashes and glitches. Justify it to the boss as a massive decrease in lost productivity. That means less money wasted paying you to not produce code because your dev tools aren't working. It'll pay for itself very quickly on that basis alone.
As for D6 vs. D2010, that's a feature argument. Start with Skamradt's response, that it helps your code be future-proof. Underscore it with OS compatibility. D2007 was the first version that understands Vista. D2010 is the first version to understand Windows 7. If you're compiling with any older version, your app is obsolete before you even deploy it because there's no guarantee it's compatible with modern versions of Windows.
Then you've got actual language features. The main improvements IMO from 2006 to 2010 are Generics, which helps out with all sorts of repetitive tasks, and extended RTTI. Robert Love has been doing some great blog posts lately on how the extended RTTI can simplify common real-world problems. (Plus Unicode, of course.)
Playing the devils advocate, there may be reasons not to upgrade. For instance you might be missing the source to certain components or you may still need to support Win9X.
I think you'll probably find the best reason to upgrade (leaving all the new wizz-bang features aside) is that you'll be significantly more productive in the new IDE. If you don't / can't upgrade I'd recommend grabbing a copy of Castalia, which can give you access to many productivity enhancements (e.g. refactoring) in Delphi 6.
DBISAM is updated, I just emailed them this past week concerning a project I hope to be upgrading from Delphi 3 to Delphi 2010.
All the other packages I looked into upgrading for that project (WPTools, Infopower, TMS) all state on their websites that they offer compatibility with 2010.
I never had D2006 (I have 2007) so I can't speak to any defects in that particular release (D2007 isn't that great, either) but it's generally a good principal to keep your tools in good shape. For a saw that means sharp, for software that means current. Especially in a new-OS year, you probably want the corresponding version of your primary development environment.
It seems to me there are 2 aspects in developing professional applications:
You want to earn money: you have to stick to your customer's demands, keep your stuff KISS, maintainable and so on... You have to be productive: no matter of generics, RTTI, widgets like flowpannel, gesture and so on because it takes time to learn and more time to use. In this way, change from D7 to D2010 is not nessary relevant. Change for another IDE like REAL Basic allowing multiplaform target is more accurate.
BUT as a developer there is a child and a poet in you, fascinated by new technologies or/and algorithms... This is the creative part of the job. You got to be creative if you want to be impressive and innovator. Upgrade to Delphi 2010 is a must have, searching for new classes, new objects is a way of life in today's programming.
That's my humble point of view and the reason that keep me spend my money to upgrade Delphi from I to 2010.
Best regards,
Didier
Lists of compatible components that already support Delphi 2010 including DevExpress (article will be periodically updated from our technology partner database) is at
http://edn.embarcadero.com/article/39864
Argument - tens of thousands of tools and components available for the things you might need in addition to the open api(s) for components and the IDE.
Item 9 of the The Joel Test: 12 Steps to Better Code is:
Do you use the best tools money can buy?
Perhaps this argument is germane here.
On the other hand if you are maintaining legacy code and not generating anything that has dependency on new OS or tool features, it is a hard argument to win. I would not however recommend generating entirely new projects on tools that old.
Unicode has been supported on Windows since at least NT 4.0, and for Windows 95/98/Me since the addition of MSLU in 2001 - so surely Delphi 2006 supports it!? [edit]Not fully supported in the component library it seems.[/edit]
I suggest that the one compelling argument is in order to ensure Vista and Windows 7 compatibility. I understand that 64bit target support was planned for Delphi this year. That may be another argument; but again it only applies if you actually intend to target such a platform, and in a way that will give a tangible benefit over 32bit code. [edit]I emphasised planned because I did no know whether it had made it into the product, but that it might be a consideration for you. It seems it has not, so the argument you put to management might be even less strong.[/edit]
Management are not going to be impressed by the "I just want cool tools to play with", you have to approach it on a "Return on Investment" (ROI) basis. Will you get your product out faster or cheaper using this tool? Are the existing tools a technical barrier to progress? Conversely, consider whether spending time porting your legacy code to new tools (with the associated validation and testing) will kill your budgets and deadlines for no commercial advantage?

Resources