Re: Just uninstalled Delphi 2005 Enterprise



Trevor de Koekkoek wrote:
Interesting. I've never encountered a development project that chose to NOT use data-aware controls that didn't have reams and reams of unnecessary mapping code and corresponding bugs to go with it. The data-aware controls IMO, though not without problems are a fairly elegant way of producing a Document-View pattern into a UI. Now mind you I am talking about DataSet aware and not database aware. I never connect my UI directly to the database and always use ClientDataSets. Most applications I write this way have almost Zero code in the UI with all the data handling happening in the Controller (my version of an MVC / Document View pattern).

Ultimately there has to be a mapping from data to controls. Either you use a good one out of the box, or build a good one yourself or write a mangled off the cuff one with no plan.

I'm not saying that a good OPF or other solution might not be better, but in my experience most projects that don't use data-aware controls because they are "BAD" end up implementing something far worse.

Agreed 100%.

I've been puzzling about the conceptual aspects of data-aware controls
recently.  I've had a long hard think about it.  Beginning with the view
that they were always bad, I now have a much more sympathetic view.
Actually, more than just sympathetic ... :) ...  I believe if you are
writing any business application where you have your stock CRUD screens
with some business actions, the data-aware method is the only method of
saving you a substantial amount of time and pain.  Whatever your
strategy, if you opt away from data-aware controls, you will inevitably
attempt to re-invent them.  And most often, the reinvention will happen
at the wrong abstraction level ... causing problems where you cannot
decompose the user artifacts into meaningful atomic sub-components (when
you need them).

(Think Lego(tm) blocks - the bigger the blocks, the less versatile they
become.)

IMHO, data-aware controls are nothing but implementations of the MVC
philosophy at the most atomic (optimal) user artifact level.  Based
strongly on the observer pattern, the idea is to represent (tabular)
data into existing controls.  In most cases, these would be controls
like combo-boxes, lists, edit boxes and grids.  And because they are
atomic, they lend themselves to be optimised for efficiencies like
client-side "lazy loading" of data, caching etc.

There is, however, an interesting tangent to the discussion of
data-aware controls when attempting to reconcile OO semantics viz.
data-aware controls are usually associated with a concept called
Table-Oriented programming (TOP) because they usually deal with the
manipulation and representation of tabular datasets.  A concept which is
not necessarily /against/ object oriented design, but is usually
construed as such - IMO, incorrectly.

In the end, I think data-aware controls are about pragmatism.  They
shine in that department!
.