I'm fairly new to programming - specifically Coldfusion, and I'm curious if it makes a difference whether I submit a form to the page it's on and process the results there, or if it should be submitted to an external file for processing, and then redirected from there?
相关问题
- Laravel Option Select - Default Issue
- HTML form is not sending $_POST values
- How to use Control.FromHandle?
- How to specify argument attributes in CFscript? (C
- Xamarin. The name 'authorEntry does not exist
相关文章
- Show a different value from an input that what wil
- How can I detect/watch “dirty-status” of an angula
- How do I prevent SQL injection with ColdFusion
- Why form submit opens new window/tab?
- Setting Angular 2 FormArray value in ReactiveForm?
- How to scope closure's variables in CF10?
- What Notable Differences are there between Railo,
- Rails: Using form fields that are unassociated wit
It can make a difference. When I first started programming I would often do things like:
myform.cfm(get/post) -> myformresults.cfm(get/post)
At first it seemed like this was a reasonable approach. The form and the form results often look quite different. They interact with DBs quite differently. In the long term this has not turned out to a good approach. Now I typically:
myform.cfm(get) -> myform.cfm(post)
Reason 1: If the form when it was posted, had issues I am already in the right place to re populate it.
Reason 2: HTTP gets are intended to get data without manipulation. HTTP posts are intended to manipulate data. This keeps with the already established pattern
Reason 3: There is less to debug. because there are fewer combinations of pages and methods
Reason 4: It is often useful in programming to see what is common, and not what is different. You may very well find that the your
myformresults.cfm
page really is quite similar tomyform.cfm
Reason 5: .Net developers are already doing this. If you work in a shop that uses .Net, they are already expecting this distinction to be present