Hi all!
After spending a good amount of time reading about and trying out the Model-View-Controller pattern in AS3 I am left with a few questions that I can’t seem to find answers for.
[LIST=1]
[]MCV is supposed to be excellent for reuse, but in practicality how would you carry out such a reuse? I for instance have practised my skills with MVC in creating a photo slideshow module that I plan on using in many other projects in the future. Now, most litterature will have you believe that adding say a new transition between the images for a spescific reuse would be easy. Just extend ImageView subclass X and make sure it implements interface Y. Good in theory, but does this mean that whoever wrote this seriously means that I should copy and paste the entire MVC pattern for the slideshow into another project and add the new transition in? This would result in having many copies of the same code with minimal alterations essentially everywhere. What other options are there?
[]MVC is a UI-driven design pattern, but what if a user decides to click the button that starts a an automatic progressing slide show. You need a Timer, and then what? The client.as doesn’t have any responsibilities regarding the workings of the pattern, the model simply loads, stores, and serves data, the view is a dumb slave serving up the contents of the model, and the controller should respond to user input in the views. Where does the Timer go?
[/LIST]
I might think up more questions as time passes, but these will do for now.
Any thoughts?