Hi Jason, what you're saying makes sense to me; these controls are very tightly connected to that particular View & they don't seem to warrant any Commands. When I design a PureMVC architecture on paper
so far I seem to end up with a tiny handful of Commands & a disproportionately high number of Mediators & Proxies however which makes me feel like perhaps I'm underusing them or missing something about their intended purpose. You're reply was most useful, ta.
Hello Cliff too, thanks a lot for the reply; I respect what you'd be trying to achieve by having a Mediator for each 3D plane/Camera etc but I don't think it would be maintainable to make these common across 3D engines due to their different implementations of World space/cameras etc.. It seems like there isn't going to be an enormous amount of shared code I can reuse between them at this level of implementation so I'm just hunting for the right high level abstraction... I haven't looked through the source for the HelloFlash Demo you mentioned yet though so I will do that and come back and eat my words later!
I'm currently thinking that perhaps I'll create an Interface I3DVCModel that my ViewComponent classes (One for Papervision, one for Away3D, another for Sandy etc...) implement that would specify a series of public methods common to each viewComponent for rotateMesh() lookAtPoint() etc which it is possible to achieve in all the engines. The actual transform calls via the 3D API will then all be handled internally by each VC. The one generic 3DModelMediator will then call the implemented functions ignorant of the underlying 3D API used (which feels nicely decoupled to me) and deal with the communications to the rest of the framework. Giving it more thought at present but I wanted to share my evolving thought train as I find other posts on this forum most useful as a learning resource when people explain their thinking; however wrong or right.
I'm very interested in the 'Module' approach you mention Jason although I'm not sure exactly what you mean by a "Module" in this context, is this an official PureMVC construct? I'm assuming that you mean keeping the assets and code needed for each ViewComponent in a separate SWF and loading that when needed. I'm yet to settle on a coherent loading strategy and this will be a nice way of achieving this so my next question regarding this is; in order to keep the overall structure of the code clean do I need to be using the Multicore version and create these external swf's with their own M, V & C Multitons (treating the 3D model viewComponent efectively as a separate PureMVC project) or can I just create a SWF that implements I3DVCModel outside the framework and use this as a ViewComponent?
I've read some interesting things about using Fabrication to architect PureMVC Multicore modular apps
http://code.google.com/p/fabrication/ but all the examples I've seen so far are Flex not Flash (I like FDT & FlashIDE & avoid MXML wherever possible) which I can deal with but slows me down and I don't want to run before I can walk regarding framework learning so I'd appreciate any insights from others on this or good links before I delve deeper.
In any case, you've both given me a massive nudge in the right direction and explaining things has helped me clarify the situation in my own mind too so thanks again for your precious time,
Cheers,
Rob
www.robmccardle.com