Re: The Zen nature of a Delphi database application



"marek jedlinski" <marekjed@xxxxxxxxxxxxxxxxx> wrote in message
news:dqc7t2l4f409mui7fs9pa3s3kies3u1g6e@xxxxxxxxxx

If I have a seemingly basic question about using a database in a Delphi
app, ...

'Basic' in the sense of fundamental. This is not an easy question at all.


[...]
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. And it's a lot less work if (when) you
want to go back and add or change something.

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.

Groetjes,
Maarten Wiltink


.



Relevant Pages

  • Re: Automated Testing of Microcontroller Product
    ... >I'm involved with an embedded product that controls a mechanical system for ... ; and of course to monitor ... I used to work for B-Tree Systems, ... I think his business model is to make money on ...
    (comp.arch.embedded)
  • Re: DataTable/DataSet in Business Object Class
    ... Business Layer project. ... To bind the product class's properties to controls, ... I am implementing Business object, ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: Business Object and User Interfaces
    ... The business object just create a Client and then it's ... So yes, practically you will have duplicated code, or in other word, two ... different codes that do the same like "Show the client info to the user". ... > to populate your controls' data? ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: i love reflection:)
    ... And how does it work when one of the property's of your business object ... load event get a hashtable of all the controls you might want to bind to ... add an event handler that binds to the leave event or similar (1 handler ... write a display method that uses reflection to display all the properies ...
    (microsoft.public.dotnet.languages.vb)
  • Re: UI and BL Interface
    ... I am designing a 3 tier application. ... I have seen examples that the UI creates and new business object ... layers, requiring a communications layer like a web service. ... business objects from its controls' events, ...
    (microsoft.public.dotnet.languages.csharp)