[Lazarus] Delphi, Kylix or Lazarus multi-form DB app example

Graeme Geldenhuys mailinglists at geldenhuys.co.uk
Thu Oct 5 12:27:26 CEST 2017

On 2017-10-05 11:10, leledumbo via Lazarus wrote:
> Because that defeats the purpose of a demo project:

A "real world" example (or close to it) would also be a very valuable 
source of information. Education for the masses. In the tiOPF project we 
stuck to small-and-to-the-point demos for many years, and was constantly 
bombarded with requests to make more real-world like examples, so they 
can see how it all fits together.

> After all, single or multi form doesn't differ much, it's just the way you
> structure your project.

And that is exactly my issue... What are the best practices? I haven't 
done "prototype" (aka RAD) style development with Delphi or Lazarus in 
over 10 years. I've long moved to a more OOP approach where I work with 
actual business/entity objects. eg: AddressList.Load(), 
lPerson.Address.Country = xyz etc, and not directly working with raw 
table data in my applications.

Last night I played with the prototype/RAD style development and found 
in so frustrating - having things hard coded everywhere (eg: fields for 
a DBGrid) etc and then when I change the data source my whole program 
bombs out because now the DBGrid is referencing columns that don't 
exist, and then I have to recreate the DBGrid columns and resize them 
again to fit the UI etc. And then there is the matter of having your 
User Interface layer chock full of business logic because I hooked into 
the various events of the DB controls, DataSource, ClientDatset. Yes - 
I've tried to place as much as possible in a Data Module, but it seems 
I'm fast heading to the same issue I had 15 years ago....


I've been using tiOPF for so long, I've forgotten what a pain 
(nightmare) RAD style development can be. Has nobody to this day come up 
with a simple set of steps on how to implement more maintainable RAD 
style projects? I have always been told by others that an OPF framework 
isn't needed, and you can have clean / maintainable RAD style projects 
with Delphi/Lazarus.... I'm looking hard, but I can't find any such 
examples, or steps to follow. :-/

Any such help would be much appreciated.


More information about the Lazarus mailing list