Hi, I'm doing my first MVC project as a test of the framework, keeping in mind some projects in the future. I still don't fully understand the flow/where to put everything (especially with pipes) but I'm getting there.
The project I'm starting with is to create a basic windowing setup similar to an OS allowing for dragging, resizing, opening and closing the content of these windows. I want to use the Multicore functionality of PureMVC. At first I was thinking of making a WindowModule, and then the shell would load in a window module every time it needs to create one. This would work fine, however, I then realized I'd need to manage these windows somehow, for instance if the user wanted to cascade, resize, them or something, or just to enforce boundaries and theings on the windows, so I then thought I would need a WindowContainerModule. What I'm having trouble with is the communication between these elements, and if this is actually how it should be done.
This is what I was thinking: 1) The shell would take a button click to open a new window. 2) It would then pipe a message to the WindowContainerModule to create a new window. 3) The WindowContainerModule would load a WindowModule 4) Certain messages in the WindowModule would then be piped to the WindowContainerModule, while other messages would need to be piped all around the application to any possibly interested party ( I guess mainly to the shell which would then handle the logic ).
Does this sound right? I'm separating WindowContainerModule from WindowModule to allow for multiple types of window modules, like a notepad or a traditional window, etc.
Anyway I realize it can be done a number of ways, but I'm currently at a loss for how to setup the piping channels. I've followed the HelloPipes tutorial so I can get the shell to talk to a sub-module, but I'm not sure how to get The windowContainerModule to talk to the other modules. I guess I can just treat the WindowContainerModule as if it is a shell of sorts and have it talk to it's submodules with a TEE-SPLIT and a TEE-MERGE, but then it would also need a pipe that goes back to the main shell.
I'm obviously out of my element, but if there is anything that I'm obviously going astray about, let me know, or maybe there is an example of a pipes windowing system already?
|