in reply to Re: CGI::Application next run mode buttons?
in thread CGI::Application next run mode buttons?

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
  • Comment on Re2: CGI::Application next run mode buttons?)