Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

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

by AidanLee (Chaplain)
on Feb 23, 2004 at 02:03 UTC ( [id://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.

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?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (4)
As of 2024-03-29 06:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found