This project is read-only.

1:1 Controller to View?; and workflows

Sep 15, 2009 at 11:56 PM

Hi Alex,

Great framework.  I have some questions on how I might model my application using your framework (without creating too much customization of your framework):

I'm working on an application that has something similar to this:

3 Major components - Login, Multimedia Note Creation, Note Submission

"Multimedia Note Creation" has multiple Views -- "Content Home", "Add Text", "Add Image", "Add Audio" and a workflow such as 'Home can go to the other 3'; 'the other 3 can go back to the prior screen' 'Image can go to Text' etc etc

"Note Submission" has multiple Views -- "Submitting"; "Submission Failed"; "Submission Success"; and a workflow like 'Failed can go to Submitting' etc

 

Would you recommend I have 3 Controllers for the major components (1 to Many; which is what I'd have if this were ASP MVC); or 1 Controller Per View?

If 1:1; would you recommend each controller directly Navigate to the next controller; or would you recommend that Flow logic be completely outside of the Controller (maybe in a State Machine)?

 

 

Sep 16, 2009 at 2:17 AM

I'd recommend to have one controller per view. If you have a simple navigation flow than you can navigate from each controller. In the more complicated scenarios (as seems to be yours) I'd recommend creating a workflow (state machine) that would make the decision based on the business logic about navigation.

HTH... Alex