Paradigms for CGI application development?
jh_lists at fastmail.fm
Wed Nov 6 05:38:21 CST 2002
On Wed, 6 Nov 2002 22:22:17 +1100, "Scott Penrose" <scottp at dd.com.au>
> On Thursday, Nov 7, 2002, at 07:34 Australia/Melbourne, David Dick
> > i would have thought that the correct way of looking at it is not
> > trying to emulate a GUI environment at all. The problem essentially
> > (unless i have missed something :)) is that we want a confirmation
> > step and we want to be assured that the transfer only happens _once_.
> Essentially I would agree with you. But the request was made (I think
> by Michael Stillwell) that it would be nice to use a GUI design
> metaphor. So I was just supplying a way that could b achieved.
This can be done within a GUI design metaphor by having your session
framework include a hidden field (or GET param) with a random value that
is stored in the server session as well. If that value is received twice,
you know that the transaction has been submitted twice. You can abstract
out the generation and validation of this value into your session
framework so that you don't have to think of it when writing your app
This has the problem that it breaks the Back button (since that will
resubmit the same value), but that's pretty much impossible to avoid if
you want to deal with this problem.
More information about the Melbourne-pm