Nice diagram ;-)

"could be designed with several Model->View->Controller rings in it"

Without getting too deep into your application, it looks like might want to think about a Controller with set of nested state machines inside. From what you wrote, it seems that this is where you are headed without using the words "State machine". If you can take a look at a State Machine Design Pattern, you will likely find the ideas that you need to implement, elegantly laid out

We have done this is a complex ActionScript application and the State machine in the Controller really simplified how we thought about the Controller and eventually the implementation was fairly straightforward and has survived a few years of maintenance and improvements without collapsing or requiring major rewrites to handle new functionality. Adding new states is easy and usually has no impact on existing state (just the transition routes).

The control functions inside each state override the defaults (Interface methods) and impose their own behaviour. If you press "next" in "Starting of Chapter" state, you get different behaviour than you do when you press "Next" in "Administering Test" state. (Ours is an eLearning delivery system). The top level of the controller only has to manage its state and make sure that event is dispatched to the current state object. When the controller starts, it builds its state engine(instantiates the state objects), sets up the View, sets the initial state and waits.


I hope that this helps.

Ron


sebastian wrote:
In case it makes more sense to look at a diagram, here is my [still in progress] UML overview of the application:
:-P

http://www.chedal.org/temp/uml_idea.png

with kind,

seb.

sebastian chedal wrote:
Hello folks,

I have a design question, the application I am building could be designed with several Model->View->Controller rings in it. But I am not sure what would be the best practice to connect them together... or if MVC is even the best way to go?

In a nut shell here is what my application does:

"An 3D interface moves with the mouse around the screen. When you click on an item, it expands to show you some info [sometimes an flv]. If you click on "more info" button, you zoom into the 3D navigation item and the flash view pane gets filled exclusively with information about this navigation item.

Each navigation item has different modules of information compared to other navigation items, and inside each module is content. There are possibly sub pages underneath each navigation page. Naturally you can close the page and go back to the main 3D navigation at any time."

Now where I am unsure about my UML OO design is in the approach of the module-templates, and whether I should use multiple M->V->C circles. I will be implementing SWFAddress [for deeplinks] and Stats, so an overall event manager [Observer] is essential.

Logically I would imagine just 3 [nested] classes for the templates:

Page->Module(s)->Content(s)
[there can be multiple modules per page loaded dynamically and multiple content item types loaded per module: button, text, flv players etc.]

but if I break 'Page' into an MCV chain I would get:

SWFAdress->PageController->PageModel->PageView
[Page Controller also sends data to StatsCollectorClass for updates]

And then another chain for the modules:

?>ModuleController->ModuleModel->ModuleView

And then I presume the content would then be loaded/attached by the 'ModuleView'

My questions are:

1. Should I bother with an MCV layout? [the application needs to built for long term use/expansion] Or just group the pages and modules together into one class each? 2. If I do split them into separate classes, where is the point of connection between two MCV chains? Is it from the parent model to the child's controller? Or from the parent's controller to the child's controller?

Thanks for your insight!

Sebastian.

_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Reply via email to