CSC/ECE 517 Fall 2009/wiki2 3 pp: Difference between revisions
No edit summary |
No edit summary |
||
Line 17: | Line 17: | ||
=<font color="windowtext">Synchronizer Token Pattern</font>= | =<font color="windowtext">Synchronizer Token Pattern</font>= | ||
How the patten works? Diagrammatic Representation? Theoretical View? Reply on session. | |||
Using POST-REDIRECT-GET avoids accidental double submits of a single request but does not help prevent a user from completing the same business process twice. Such a business process is typically composed of multiple pages spanning several requests. Synchronizer token pattern adds additional safety on top of the POST-REDIRECT-GET idiom by preventing a possibly intentional resubmit of a page. Both the techniques should typically be combined to deliver a complete solution. | |||
=<font color="windowtext">Implementations of the pattern provided by various frameworks</font>= | =<font color="windowtext">Implementations of the pattern provided by various frameworks</font>= |
Revision as of 05:34, 7 October 2009
Synchronizer Token Pattern - Introduction
Double Submit Problem
What is the requirement of having this pattern. Some examples such as Add to cart being pressed twice can result in 2 items in the cart etc. The example should provide or demonstrate how devastating this can be. Some financial example such as clicking on Pay button twice could charge credit card twice etc.
Solutions for Double Submit Problem
Can be server side or client side. Server Vs Client which one is better?
Client Side Solution - Javascript Control Disabling
Briefly describe the approach. Discuss pros and cons.
POST-REDIRECT-GET
Briefly describe the approach. Discuss pros and cons.
Synchronizer Token Pattern
How the patten works? Diagrammatic Representation? Theoretical View? Reply on session.
Using POST-REDIRECT-GET avoids accidental double submits of a single request but does not help prevent a user from completing the same business process twice. Such a business process is typically composed of multiple pages spanning several requests. Synchronizer token pattern adds additional safety on top of the POST-REDIRECT-GET idiom by preventing a possibly intentional resubmit of a page. Both the techniques should typically be combined to deliver a complete solution.
Implementations of the pattern provided by various frameworks
Struts
Spring Web Flow
Ruby on the Rails
Grails
References
[1] References go here