Futurescale, Inc. PureMVC Home

The PureMVC Framework Code at the Speed of Thought

Over 10 years of community discussion and knowledge are maintained here as a read-only archive.

New discussions should be taken up in issues on the appropriate projects at https://github.com/PureMVC

Show Posts

* | |

  Show Posts
Pages: 1 [2]
16  Announcements and General Discussion / General Discussion / Re: Submodules in a Core? on: April 28, 2010, 11:17:22
So I'm also interested in best practices in project structure and inter core/module communication if anyone has any tips.

As far as communication goes, I'll only ever (as far as I know now) have to pass the userVO down from Tier #1 to Tier #3 but there is never Tier #2 to Tier #2 communication. What is the best method for that?

As far as project structure goes I was reading on this post and was wanting some clarification: http://forums.puremvc.org/index.php?topic=856.0

In reality you usually have several projects.

 * One project for your main app,
 * At least one for your modules (if not several that group modules, or even one per module).
 * One or more library projects where you put classes that you share between the other projects so that they don't depend on each other or duplicate classes.

Compile your modules and libraries to make all their dependencies external, so that PureMVC, Pipes, Flex and any other dependencies are expected to be present in the main app, and aren't being compiled into your module.

Compile your main application to include these libraries. This may make the main app a little larger but the modules will be small and efficient.

1. So would I have the libraries in the main application and reference it in the sub applications (other projects)? Can you just reference a library and not have it in the build path? Or would I have a seperate project for the library rather than being in the main app?

2. So when do you keep different cores in a core folder in the main project and when do you break them out?

Going back to #4 in my previous post, I see how having modules in separate applications identifies them with their classes. Is there a way to do this if it is all in one application together?

17  Announcements and General Discussion / General Discussion / Submodules in a Core? on: April 28, 2010, 09:13:29
Scenario: I am working on a system that is going to be used to integrate different systems into one. It basically has three levels.

[Tier #1] This part is kind of "like" a portal environment like JBoss or Sharepoint. It only acts as a frame upon which to hang other applications. It provides authentication for and navigation within applications that are plugged into it.

[Tier #2] This is basically a set of related modules. Depending on a user's permissions they may or may not have access to all of the modules in this set. But they are all tightly related and use the same classes. Likewise, each user may or may not have access to each set of modules as a whole. In fact, depending on the client, the entire set of modules may not be present on the server. A set of modules would not directly relate to a portal in a portal environment but could include multiple tabs.

[Tier #3] This is each module inside a set of modules. To keep users from loading apps that they wont use or don't even have permission to I made these modules.

So I am using MultiCore and it made sense to make each set in Tier #2 a core to keep all the related classes together. The way Tier #1 handles navigation is that a user should be allowed to switch from any Tier #3 module to another, even if it is in a different set (this makes sense in the application). The question is how to I initialize the Facade for that Core and how do I alert it to which module to default to. Here are the two solutions I have developed:

1. Have each module in the core initialize the facade and the facade handles each of their start up commands. There is no main application for each core.
2. Have a main application for the core that is capable of loading each module in it. Inform the main application which module to start with.

So I implemented Solution #1 and it works great. But here is what I was wondering:

1. In MultiCore does module = core? Is it bad design to have a module that is not a core? I'm kind of unclear as to what a "core" is. Is it an application? Is it a piece of an application, and if so, is it expected to have a lot of communication with other cores or be fairly independent?
2. Is my implementation abusing MultiCore because there is no main application for each core in Tier #2?
3. If I went with Solution #2, how would I tell the core what module to load up? (is url params the only way)
4. What is in a module? If I have multiple modules that use the same proxie does each of their SWF files contain that proxy? Can/How do you specify what classes are associated with a particular module?

In the end this might just be a paradigm shift on how I handle navigation, but I still need to know more about MultiCore. I know an initial reaction might be "well, if these are different applications then treat them like they are". And I might go that rout, but this system needs to be more integrated than a standard OS or portal environment. Thus the fuzzy distinctions. And I won't have time for a while to remake Tier #1 to be like that anyways.

18  Announcements and General Discussion / Getting Started / Re: Newbie Questions on: April 28, 2010, 08:11:19
Thanks, I'll look more at the example!
19  Announcements and General Discussion / Getting Started / Newbie Questions on: April 27, 2010, 09:29:24
I've been using Flex since January but I just started using PureMVC Multicore a few days ago. I feel like i have a good grasp on the general architecture, but here are a few questions about specifics:

1. Where does filter and sort functions go? I am leaning toward the view since it doesn't actualy alter the data but changes the way it is displayed, or rather what portion is displayed. But I could see it going in the model.

2. Where do i put the processing for getting data from forms (especialy dynamicaly generated forms with unknown number of elements)? It would be nice to have a "code behind" to do this but i don't want to abuse the mediator as one. (on that note, is there a good way to get data from a dynamicaly generated form... binding a model isn't always practical?)

3. On a similar note as #2, where do i put more complex visual manipulations like drag and drop operations? Is it wrong to create a code behind like file?

4. Should I embed icons in the model or the view? I could see them as data but technicaly they are visual data.

5. I am used to the DAO concept and try to keep them to just queries. If i need further data manipulation i create toolkit like classes that help them out. Is there a good design to do this in the Model? Is this a case of using a Proxy to modify the data and use a Delegate like a DAO?

6. What is the standard use of delegates and their relationship to proxies?

7. I don't find myself using commands all that much. When I made up my own MVC architecture in previous projects I did a lot in the Controller. It just seems weird. I feel like I either used to put to much in the Controller or now I don't put enough. Thoughts?

Pages: 1 [2]