Re: The Zen nature of a Delphi database application
- From: "Bjørge" <bjorge@xxxxxxx>
- Date: Sat, 17 Feb 2007 00:00:25 +0100
Maarten Wiltink wrote:
"marek jedlinski" <marekjed@xxxxxxxxxxxxxxxxx> wrote in message
news:dqc7t2l4f409mui7fs9pa3s3kies3u1g6e@xxxxxxxxxx
[...]
Should I (a) use database functionality ONLY, and connect query
results directly to UI controls, then write data from the controls
to the DB? Or, should I (b) read from the DB into objects that
represent the data (a "data model"), populate UI controls from those
objects, then write data back from the modified objects to the DB
for storage?
The state of the art is to do (b). It's more work up front, but it's
better and it _can_ be done.
It _can_ be done, but it should be done only if it's the "best" or "easiest"
solution, not only because "it's OO".
And it's a lot less work if (when) you
want to go back and add or change something.
No. It means you need to change your database AND your classes. IMHO,
classes are alternatives when their metadata can be used all through the
application. If data definitions come from the database, better use
string-based storage like xml or TStringList of TStringLists...
Subscribe to borland.public.delphi.oodesign and read back a year or so
(it's not a busy group). You will learn exactly everything you want to
know about business object, data packets, lazy loading, object
identifiers, and separating UI, business model, and backing store from
each other.
....and do yourself a favour not forgetting that OO nerds are the worst
fundamentalists of all in IT world.
*Then* listen to their good advice ;-)
--
Bjørge
'93 TDM850
bjorge@xxxxxxxxxxxx
.
- References:
- The Zen nature of a Delphi database application
- From: marek jedlinski
- Re: The Zen nature of a Delphi database application
- From: Maarten Wiltink
- The Zen nature of a Delphi database application
- Prev by Date: Re: The Zen nature of a Delphi database application
- Next by Date: Re: question about Delphi and Visual Studio .NET
- Previous by thread: Re: The Zen nature of a Delphi database application
- Next by thread: Re: The Zen nature of a Delphi database application
- Index(es):
Relevant Pages
|