Data operations - event trigger options: Best Practices?
This is a basic question and applies to any Data Assist function where there are several options available to trigger the event like "any form post" or a particular button press. In cases where more than one option will work the same way, is there a default or preference or best practice?
In DW's original server behaviors for inserts and updates, there was only the one option, the form post (or form/page submit). By using only what was available in the server behavior dialogs, you were basically locked into this and the way it worked - the form submits, but back to the same page so the page would first reload, bringing the form variables with it. This also included the condition required to process the data operation script and finally the redirect. Having these other options available opened up for me many other ways to make the page work including providing more options to the user on how they want a particular procedure to be carried out.
I can easily figure out when not to use a particular option like "any form post" when the page has multiple forms. I've also used several instances of the behavior along with the various trigger options to sequentially carry out a string of inserts/updates/queries and the like all on the same page. But then there are the more simple pages - one form, one button. Does it matter which trigger I use?
Maybe the answer is basically if they both work and get the same results, it doesn't matter. But, even then - would one be preferred over another? Perhaps it may have something to do with optimization where one would have fewer lines of code, or one would require more or less server involvement? Or maybe the best practice would be decided by those that come after me, should someone else be tasked to update the page at a later time.