Board index » off-topic » TCustomKTClientDataSet

TCustomKTClientDataSet


2005-07-27 10:31:11 PM
off-topic3
Kostas Terzides wrote:
Quote
I clearly understand that, it's just a question I wanted to make you
about midess project (and my participation in it) and I don't know if
everyone reading this group would be interested in it.
Actually I think this is precisely the sort of thing that you would do
well to get a broad range of opinions about, rather than just mine.
Quote
I don't know if you are currently active on the project or
if you have any time to spare, but I would certainly be very glad to
have any feedback. If you have trouble getting in the CVS, my
components are also in cc (23068)
I haven't been active and have very little time, but since you gave a
CC link (cc.borland.com/Item.aspx I did look at what
you wrote there.
I do agree that many-to-many is a weakness of DataSnap right now.
Quote
1) A new property PrimaryKey that cuts off dependency on Fields[0].
In prior version Fields[0] was assumed to be the primary key. All
field types are now supported (not just TIntegerField types).
What's wrong with TField.ProviderFlags.pfInKey? That's what we use to
track PKs client-side. No special property should be needed for this,
and it handles multi-column keys, which I don't recommend, but
nevertheless....
--
Craig Stuntz [TeamB] ?Vertex Systems Corp. ?Columbus, OH
Delphi/InterBase Weblog : blogs.teamb.com/craigstuntz
Everything You Need to Know About InterBase Character Sets:
blogs.teamb.com/craigstuntz/articles/403.aspx
 
 

Re:TCustomKTClientDataSet

Craig Stuntz [TeamB] wrote:
Quote

Actually I think this is precisely the sort of thing that you would do
well to get a broad range of opinions about, rather than just mine.
Ok, I'm glad to hear that. I initially avoided doing it because I
thought using b.p.datasnap this way might look as if I tried to
advertise my components (although I don't consider them third party,
they are just an effort I made and I would like to share and discuss it
with others)
Quote


I haven't been active and have very little time, but since you gave a
CC link (cc.borland.com/Item.aspx I did look at what
you wrote there.

I do agree that many-to-many is a weakness of DataSnap right now.
My main motivation in building these components was to try to give
ClientDataset some features that .NET Dataset has. I think that a
datamodule containing a couple of client datasets has a lot of
similarities to a .NET dataset and feature wise the only thing that
client datasets didn't support was enforcing referential integrity rules
(that happened only in nested dataset structures). I implemented that
(in a somewhat simplistic way) and tried simplifying applying updates of
all these interelated clientdatasets.
Quote

What's wrong with TField.ProviderFlags.pfInKey? That's what we use to
track PKs client-side. No special property should be needed for this,
and it handles multi-column keys, which I don't recommend, but
nevertheless....

The (simplistic) way I implemented enforcing of referential integrity
constraints was based on the fact that a TCustomKTClientDataset has a
collection of field components (belonging to other datasets) (persistent
unfortunately) that all reference the field representing the primary key
of this cds and I don't support composite keys.
That is the main reason I had to "create" a property called
"PrimaryKey". If I relied on pfInKey and this was set for more than one
field, then I would have to figure out a way of finding which field
would represent the primary key (meaning the field that foreign keys
should reference). OTOH if only one field in the cds has pfInKey set,
then my PrimaryKey property is assigned automatically. The other reason
was that I can override AutoIncrement behaviour of a pk field in design
time and make it AutoDecrement (taking negative values) as is proposed
by Dan Miser in a 3-tier app.
The main area I would like to have the opinion of experienced midas
developers (and feedback in general) is in the way I implement applying
updates. I believe it is the biggest advantage of my components and it
really works very well in my sample applications (and in a SOAP based
test application with 23 multiply related tables), but I would certainly
like any comments and/or suggestions
TIA, Kostas