You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flex.apache.org by Greg Reddin <gr...@gmail.com> on 2012/04/06 19:13:20 UTC

[OT] Remote Save/Delete Best Practices

This post probably belongs on a flex-user group, but I'll ask here for now.

What are the best practices in a Flex web application when saving data
to a remote server? Here's the use case:

You are using an application that allows you to set up reports and
save the report definition to the server. So users can save multiple
report definitions and call them up at will. You know the remote save
operation will take a few seconds to complete, but you don't want to
reduce the user experience during this time. So you go ahead and add
the report definition to the user's display list while the operation
is occuring in the background.

Let's say now the user tries to modify or delete the report definition
before the save operation has completed. At this point you have an
error because they are trying to delete something that doesn't really
exist.

What's the best practice for this case? I see the following options:

1. Disable the entire UI until the save operation completes.
2. Disable the portion of the UI that modifies the data until the save
operation completes.
3. Display an error if the user modifies or deletes the item before
the operation completes.
4. Hope your server and connection are fast enough to never encounter
this problem :-)

I'd love to know how you guys handle this type of situation.

Greg