How easy is Delphi?

moonshinemadness

Platinum Member
Jan 28, 2003
2,254
1
0
Hi guys, my dad has commissioned me to learn Delphi Programming Language so i can make some changes to a SQL Database client i want to know how much of a challenge i will have ny taking this on. He can get the source code for me so it basically just making changes. Can it be learnt out of a book, and can i (I have no previous programming experience) learn it to this standard relitively easily, i am happy to put in the hours that are needed. Thanks guys.

PS Can you recomend any decent books to start learning with?
 
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
Delphi is basically OO Pascal, it's pretty simple.

But really learning to program can take time, there's a lot more to it than just typing commands into a text editor and compiling.
 

Haden

Senior member
Nov 21, 2001
578
0
0
It's somewhat easy if you know pascal.
I suggest to do not use binary-only components (which you'll find hundreds floating around) - it's right path to problems.
 

SearchMaster

Diamond Member
Jun 6, 2002
7,791
114
106
It's been years since I've used Delphi, but I always loved it. One thing you'll find is that the Delphi community at large is eager to help you with your problems. Find the Delphi newsgroups, etc. At least, that was the case 5-7 years ago or so when I was learning MSVC and Delphi concurrently.
 

tinyabs

Member
Mar 8, 2003
158
0
0
Originally posted by: SearchMaster
It's been years since I've used Delphi, but I always loved it. One thing you'll find is that the Delphi community at large is eager to help you with your problems. Find the Delphi newsgroups, etc. At least, that was the case 5-7 years ago or so when I was learning MSVC and Delphi concurrently.

It is better to start with Visual Basic first if you are new to programming. There are many details to take care of in Delphi. The language is simpler and framework is easier than C++.

I would recommend it for intermediate programmers. One word of caution, if you don't pay attention to details, it will give many exception dialog boxes.

 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
It is better to start with Visual Basic first if you are new to programming.

Most definately not. VB lends itself very well to bad programming habits, and using it ties you to Windows. Just like I wouldn't recommend Perl for a first language, although I would recommend it before VB.
 

glugglug

Diamond Member
Jun 9, 2002
5,340
1
81
Originally posted by: tinyabs
It is better to start with Visual Basic first if you are new to programming. There are many details to take care of in Delphi. The language is simpler and framework is easier than C++.

Delphi doesn't hide what is going on behind the scenes nearly as much as VB. This is a GOOD thing. The way VB obfuscates things WILL get you into trouble. Plus, as Nothinman said, VB teaches bad programming habits. Hell, I'd go as far as to say VB frequently enforces bad programming habits with things like its lack of exception handling, the inability to split a class implementation across files (short of having global functions...), an IIF function that first makes you think its like ?: in C but actually you end up using an expanded if-then-else because iif evaluates both cases regardless which one is specified, and converts things to variants, no way to pull individual chars out of a string without a high overhead mid$ function, or compare them as chars (not strings) , etc.

Also, the VB framework is NOT easier than Delphi, in fact its quite the opposite. VB teaches you how NOT to think about programming and will increase the learning curve when you try to do other languages later.

BTW, a SQL client is probably not a good project to first learn programming on. Learning SQL and dealing with the associated objects may be the hardest part of the project.

A few tips for beginning Delphi:

1. F11 brings the Object inspector to the front, F12 switches between having the code editor and the associated form in front
2. Types declared using the "class" keyword are always descended from TObject, and are inherently pointers, even though you use just a '.' rather than '^.' to refer to their data elements & methods.. When you declare one of these objects the default value is nil, you have to say "variablename := WhateverClass.Create;" or assign it to some existing instance before actually using it. Deallocate the object with Free, not Destroy, this checks if it is nil before trying to call the destructor. Types declared with the "object" keyword are classic object pascal style objects which are not inherently pointers (you will probably never use these).
3. Use the events tab in the object inspector to see the list of all events a component/form supports, rather than just setting the default event you get double clicking it. BTW these events are actually function pointer properties you can reassign at runtime.