views:

236

answers:

7

There's a lot of old Delphi books available inexpensively. As a self-taught (advanced) beginner, it is difficult for me to know which ideas are still relevant and up-to-date, and which have become outdated. I'm hoping for a little guidance. For example, would it be outmoded to learn about databases powered by BDE? Is COM no longer a commonly used model? (note: I may be off in how I'm using these terms ... I don't know much about them.)

Thanks for your thoughts!

+6  A: 

BDE is dead, but it may be used somewhere, and you may find BDE enthusiasts. BDE was tricky to install, and there were some legal problems as well. COM is also dead, but it is still available and widely used in legacy applications. Most people use free libraries like JEDI or Zeos - or commercial, DevExpress or TMS. I think learning basic VCL and some free libraries will be good to start. Also knowing exactly how objects and classes work in Delphi will be a great aid for your career development.

smok1
+4  A: 

Most Delphi books still have large chunks of relevant stuff in them. Most of the stuff that is still good is the low level stuff, such as writing code, using dlls & bpls. Even writing components is pretty much the same. I referred back to a Delphi 3 book the other day and found what I wanted.

As a recommedation I'd get a combination of older and newer books. In terms of new I'd get Marco Cantu's Delphi 2007 & 2009 handbooks, and his Mastering Delphi 2005 (ignoring the .net stuff) or Mastering Delphi 7 which will give you pretty good coverage and are all excellent books. Bob Swart also has some useful books.

You probably don't want to go back to anything earlier than Delphi 3, but some pascal programming books can be helpful.

You probably shouldn't be paranoid about reading about outdated stuff, being aware of it is very helpful if you have to work with legacy code, So long as you brush up on some more modern books you should be okay.

I'd also recommend reading Code Complete 2 or The Pragmatic Programmer. You may also want to read books on Design Patterns and Refactoring - which there none written for Delphi specifically.

Alister
+1 for The Pragmatic Programmer. Excellent book. I'm currently reading Code Complete 2.
Pauk
+7  A: 

A lot of the Delphi concepts (and code), even from older versions, apply equally well to newer ones. Certain components aren't around any more (NetMasters, etc), some are frozen and shouldn't be used for new development (BDE), and there are a HUGE number of new features to catch up on.

As for COM. In the immortal words of Lino Tadros (the guy largely responsible for getting COM support into Delphi):

COM is like SMOKING: If you have not started, you should not start now, if you are already doing it, it is time to stop.

Bruce McGee
+1 yeah - like smoking bad pot that is! :-)
marc_s
+6  A: 

Death of a coding practice is a very relative thing. I still know of COBOL applications that are still running... mainly because they still work and don't deal with dates so it was more than ok to just let them run. Sometimes it might not be the best "new way" of doing things, but if it works without any changes... why mess with it.

The concept of COM hasn't really died... its evolving, and knowing how to use it can help you understand and apply the latest evolution. Do you need to know assembly to be a good Delphi programmer? Absolutely not, but it is knowledge that can be helpful in understanding how to better optimize your routines.

In Delphi, COM isn't just about the object model. Its also about interfaces. Interfaces can still be a very useful tool in the bag and if you know COM development in Delphi you know how interfaces work.

As for the legacy books... I say keep them on the shelf and glance at them from time to time. Sometimes looking back might help you leap forward. Its why I have a copy of Algorithms + Data Structures = Programs on my shelf. Funny thing, most of the code in the book still compiles with a few minor changes. Sure the code is not OOP, but the concepts are still ones I use today. You might be amazed at how much a binary tree hasn't changed, and how the best way to optimize it is still the same. How sometimes using a simple old-master new-master routine is faster than loading the data into a SQL Table and then performing an update.

Its not ALWAYS about the cool factor... sometimes its about what works.

skamradt
+1. If it ain't broke, don't fix it.
Mason Wheeler
A: 

Calvert's Delphi unleashed is also a nice started for Delphi and COM.

Marco van de Voort
A: 

For database access the older books will recommend using the BDE however the BDE is deprecated and should not be used in new applications.

BDE means the Borland Database Engine. Any application that uses the TTable, TQuery, TSession and TDatabase components is using the BDE.

The database access method you should use instead is the dbExpress/client dataset disconnected data access model. That sounds a little complicated and yes, compared to the old BDE stuff it is a bit more difficult.

In a typical BDE application the components from GUI to database were hooked up like this

TDBEdit to TDataSource to TTable to TDatabase

In a dbExpress client dataset style application the components are hooked up like this

TDBEdit to TDataSource to TClientDataSet to TDataSetProvider to TSQLDataSet to TSQLDatabase

The first two parts in that chain (TDBEdit, TDataSource) work exactly the same as any Delphi book you can find will describe.

The next two parts, the ClientDataSet and TDataSetProvider, were originally called MIDAS but are now known as DataSnap. They have been around quite a while too but it is only in the last few versions that they became the officially recommended database access solution.

The TSQLDataSet and TSQLDatabase are the newest part of that chain and are known as DBExpress.

LachlanG
A: 

Any Delphi book since Delphi 3 should still be largely relevant in most aspects. Major changes were made in Delphi 3 so anything before that may be out of date.

I would concur with others that the BDE is defunct. I never liked it even when it was supposed to be the primary option with Delphi. This might explain why it took Borland so long to provide a decent built in ADODB set of components (you had to buy them as optional extras in Delphi 5).

COM is still very relevant if you have any necessity to do inter process communication (I'm not sure what alternatives are available for all the people who say COM is Dead). In fact COM+ (a service on Windows Servers that hosts objects for scalability) is still an integral part of microsofts strategy. COM is by no means perfect, but it has yet to be replaced by Microsoft as a concept (no .NET does not replace it).

Toby Allen