Dane,

>the record could be left in an invalid state,
>and then synced to a server where it would create havoc among back office
>systems, etc.

Here is the crux of the problem.  The back end shouldn't allow anything which
will create havoc.  I'm not saying the Palm shouldn't do its level best to only
pass validated contents, but the back end needs to validate too.  This may
require referential integrity constraints, triggers with business rule
validations, etc.  But no back end should blindly accept what is passed to it,
IMHO.

The Palm OS paradigm is such that you really should allow a user to exit and
later resume where they were at, even if that is a partially edited but not
validated record.  This allows them to jump out to the address book, calendar,
calculator, or whatever.

To avoid the possibility of an interim Hot Sync sending an uncompleted record to
the back end, just keep work in process in a different database.  Use another
database for the unvalidated record(s).  When the editing is complete and
validated, use can use DmDetachRecord to orphan it from the work-in-progress
database and DmAttachRecord to place it in the database to get Hot Synced.  Or
perhaps just add a status field to the record, and allow the back end to ignore
those records with the status set to unvalidated.

But whether or not the Palm sends bad data, the back end needs to enforce
business rules too.  I'm a belt and suspenders type of guy.

Doug


--
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/

Reply via email to