It boils down to which should be responsible for possible state transitions: the controller or the view?

I think controller. Therefore, I need a way for the controller to tell the view which state transitions are allowed, in order for the view to correctly prompt the user. Since this needs to happen for every state (except an end state), I think it makes sense to put them in the run_modes(...) declaration. I'm looking for other ideas.

How the view takes the 'possible next states' data and presents it doesn't matter to me. But the complicated part is each view component needs the data in a different format... H::T will need it one way, TT2 another, etc. I'm using the form rendering piece of CGI::FormBuilder at the moment for 'brevity' in my example (a bad choice I now see). I will create a .tmpl file and adjust my example to it.

How to abstract the possible next states data and how to have 'plugin' support for different view components is what I hope to discuss. But I need to make a better case and a more detailed write up will be forthcoming ;)

At least that's how I've been looking at it.

--Solo

In reply to Re2: CGI::Application next run mode buttons?) by Solo
in thread CGI::Application next run mode buttons? by Solo

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.