Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: Question about designing a web app using CGI::Application

by AidanLee (Chaplain)
on Feb 23, 2004 at 02:03 UTC ( #331008=note: print w/replies, xml ) Need Help??


in reply to Question about designing a web app using CGI::Application

I generally take the approach that each run mode should do one thing. How you determine the granularity of the 'one thing' is up to you, but by and large I tend to define my 'one thing' is 'what do i need to do to get the user to the next screen?'. So, most of any given run mode I code is geared towards retrieving/manipulating/authenticating data to feed to the template i want to serve to the user. And unless the user is doing the same exact action again (not the next 'bit' of the same action), they won't be revisiting that run mode.

That said, I do at times go one step further, particularly for important forms. I'll dedicate a run mode just for the processing of the submitted data, and then send the user an HTTP redirect to the next mode. This is so that the user doesn't accidentally resubmit the same data with a refresh when they're on the next page.

  • Comment on Re: Question about designing a web app using CGI::Application

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://331008]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (6)
As of 2022-05-20 15:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you prefer to work remotely?



    Results (73 votes). Check out past polls.

    Notices?