|
This is based on a digested/updated extract from newsgroup post from a
user converting from Midas/Datasnap to kbmMW. Its not ment to be a complete
list of things to be aware about when converting, and its also not listing all
the additional features in kbmMW not in Midas/Datasnap.
Midas/Datasnap and kbmMW are two frameworks both supporting remoting
datasets. As such the basic principles are similar, but the implementations
different. Generally converting from Datasnap to kbmMW is relatively
easy. The preferred way for many is to start with one of the kbmMW demos
that match the existing Datasnap database setup, and then extend the demo from
there, adding the business features from the Datasnap application server to the
new kbmMW application server.The following is a non exhaustive list of
things to be aware about when doing a conversion:
1) Cloned Datasets are Attached tables in kbmMW. They behave
similar.
2) Filtering in Midas is slightly different compared to kbmMW, i
has its own expression parser. For example "%" is a valid wilcard on midas. In
kbmMW its * and ?.
3) IndexFieldNames works different. On Midas, if you set IndexFieldNames :=
field it will create a temporary index. On kbm, you need to create the index
before setting indexfieldnames, or indexfieldnames will fail silently.
4)
Master-Detail is different. In kbmMW you don't have (and this is good!)
datasetfields, so you can't create a master-detail on the server. On the other
side you have client transactions, and I think it is a far better solution to do
atomic updates. (On midas the only way to do an atomic update on masterdetail
tables was to create the relationship on the server)
5) Threads on the
client work fine, so you can retrieve data from the server on a secondary thread
without issues. Even when I have done this on midas too, it is much easier here
and you can delete hundresds of lines of code when migrating.
6) Conflict
resolving is somewhat different. Midas as a built in reconcile dialog which is
activated when 2 people modifies the same record, showing old and new values
allowing you to merge, overwrite, skip etc. In kbmMW your
client have original client and new client value. To get the newest
value from the server your client will have to retrieve it. Having done
that you can merge if you want to.
7) Server side resolving is dirrerent too. On Midas for complex updates you
would use an UpdateSQL component, here you use the tablename and tablefields or
events for more complex things. (the whitepaper about resolving is good to
explain this)
8) On Midas reconcile errors (that is, errors because some
people modified other record while you were offline) go into the
OnReconcileError event, and the rest go as exceptions. On kbmMW, all errors on
resolving go in an event.
(Top)
|