Esteemed Monks,

I have been working on a rather large WebApp for several weeks now. So far I have been working in the same way I used to develop straight CGI applications. Each CGI::Application run_mode is self contained. For example if you want to register for the site you go to mode_001 and it renders the empty form. When you submit it takes you back to mode_001 and the form is validated and the data untainted or taint checked and written to the database. Error handling (duplicate username, invalid password and all that) get taken care of in the same run_mode. So you may in fact call that run_mode a number of times whilst you complete that phase of your interaction.

When you are registered I was going to produce an appropriate navigation panel that said, e.g. "You are now registered, the following options are available to you:" and the nav section would provide the next run_mode.

To my mind this gives the user a degree of flexibility about what he does. But last weekend a friend and sometime colleague was looking at the code and said: "nah, you gotta control the users path. Lead them by the nose or they will get it all wrong!". This would mean a rewrite to allow each run_mode to pass the user directly to one and only one run mode for the next phase.

How do other monks feel? I have spent much of the day agonising over the issue and felt that some other opinions would give me the clues as to how to go about this application. It will be very large, I expect some 200+ run modes by the time I am finished.

One of my questions is this: should run-modes be kept should and simple perhaps handling only a part of a sungle site function? For example, for an administrator to select and view user profiles, should the saearch, select, view and edit each be a separate run_mode or is it, in your opinion, okay to combine them into one run_mode?

jdtoronto


In reply to 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.