I'm working on a medium sized CGI:A based web app here at work. It has about 70 or so rms. Each rm corresponds to one page, with a couple of exceptions. (more about these in a moment.) Unlike your setup, I also dedicate a run mode to processing each page that has inputs. These are imtimately related so that share a naming convention like:
  • edit
  • edit_proc
edit_proc validates input, and does something with the valid results. It would call edit if there were any user input errors and return that form to the user with errors indicated.

I've got a situation where two input forms are very similar, (creating a user, and modifying a user) They are just different enough that I have a unique run mode for each to set them up, but I use the same _proc to handle the inputs.

You posit:

you gotta control the users path. Lead them by the nose or they will get it all wrong!
This is a UI decision, which depends closely upon what you are trying to accomplish. Sometimes it is appropriate, othertimes no. In terms of CGI:A and how you code, it doesn't really matter, as you could support either. Supporting a lot choices is easy, just have them encoded in hrefs in the returned html. If you want to force the user on a path, just give them html that contains only a submit button with a hidden rm field indicating the next runmode.

Should "search, select, view and edit each be a separate run_mode"? Yes, in my opinion they should be seperated. Keep in mind that you can always factor out common code into an outside module for reuse across these runmodes.

Cheers

-------------------------------------
Nothing is too wonderful to be true
-- Michael Faraday


In reply to Re: CGI::Application, have I made a big mistake. by freddo411
in thread CGI::Application, have I made a big mistake. by jdtoronto

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.