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]
1  PureMVC Manifold / MultiCore Version / Which object implements IPipeAware? on: March 23, 2010, 07:16:02
I've seen it in the top-level Document class, the Facade and sometimes not at all.

Where's the best place to implement IPipeAware?

Thanks.
2  Announcements and General Discussion / Getting Started / Adding and removing view components from stage... tangle of concepts. on: January 20, 2010, 09:45:04
I'm taking a step back from the project I'm working on and trying to relearn the principles behind view components. I've read several posts that address concrete mediator / view component coupling and have read the best practices document half a dozen times, but it still doesn't click.

My issue is that I don't understand who is ultimately responsible for adding or removing a viewcomponent from the stage. By extension, I don't understand how entire sets of components (complex interfaces, for example) are managed and, to take it up one more level of abstraction, what that means for multi-swf projects.

Imagine a user signup process. The user goes through several screens containing forms and, upon completion, is dropped into the 'home page' which is a new swf. How do I break this down? Each page is a seperate view component? Global mediator handles the transition between page components? Upon completion, some kind of super global mediator drops the whole user signup swf and then loads the home swf?

I think my confusion is falling in these areas:

- Should the overall view hierarchy be managed in one mediator? I imaging if we're loading and removing entire panels there needs to be some parent to handle that transition. But which actor is actually processing the 'addChild' & 'removeChild' commands? Are we adding child directly to stage or to GlobalView?

- Mediators are allowed to add their own components. But don't mediators expect 1 argument for it's viewComponent? Do I just drop that param and create the viewComponent myself in the constructor?

- Ok, so even if we have mediators creating their own components, where do we instantiate the mediators? I know the initial set of mediators are created in the StartupCommand? Does it then follow that any new set of mediator / view component pairs be created in a command?

- How does this tie into a multicore paradigm with several swfs? I feel like this would require several sets of generic stage handlers, each handling the adding and removing of view component / mediator pairs according to their level of abstraction. I.e. GlobalSwfMediator which loads swfs which each have their own StageMediator which loads view components which each have their concrete mediator which add subcomponents... and so on down the line.

There are just some of the basic issues I'm not clear on. I understand the principles of view encapsulation and notifications and separation of data model from business logic... etc. There's a chasm, however, between these design concepts and practical implementation.

That's for your patience, I know this is waay too wordy. I just want to distill the above tangle of concepts and responsibilities into a few key techniques and I feel like a lot of people go through this stage with the famework.

Thanks for your help!
3  PureMVC Manifold / MultiCore Version / Notifications in multicore? on: January 06, 2010, 10:55:38
Can notifications be sent between cores in MultiCore?

For example: LoginProxy in CoreA sends a notification LOGIN_SUCCESSFUL to a mediator in CoreB which in turn loads CoreC... etc.

Thanks.
4  PureMVC Manifold / MultiCore Version / Page 'redirect' in Mediator or Command? on: December 29, 2009, 02:44:40
If I have a LoginFormMediator that listens for a LOGIN_SUCESSFUL notification from a remote proxy, should I load the homepage.swf  in the LoginFormMediator's notificationHandler? Or, in the interest of code reuse, create a Redirect command that handles the loading of external SWFs and pass it whatever it needs?

Is this something the PureMVC has a philosophy on or am I starting to get too implementation-specific?

Thanks.
5  PureMVC Manifold / MultiCore Version / Simple Modularity 1.2 question... on: December 29, 2009, 08:41:46
I'm trying to understand the Modularity example to get my head around MultiCore.

Is org.puremvc.as3.multicore.demos.flex.modularity an example of a 'Shell' core?

Thanks!
6  Announcements and General Discussion / Getting Started / Multi-page Flash apps without MultiCore? on: December 23, 2009, 11:39:20
I'm working a Flash project with a half dozen or so different screens. My understanding based on posts in this forum is that any project that requires loading multiple SWFs is a good candidate for MultiCore.

Since I'm new to PureMVC in generally and want to avoid the added complexity of MultiCore, I'm curious if people have been able to implement complex, multi-page Flash movies without it. I'm assuming that if I can't load external SWFs without MultiCore the only other option is to store each page as it's own MovieClip and load them dynamically. If that's true, am I correct in assuming that these clips will all have to load when the app is open and there's no way to load a MovieClip on demand?

If anybody has solutions that have worked for them, I'd love to hear them.

Thanks.
7  Announcements and General Discussion / Getting Started / Role of StageMediator? on: December 17, 2009, 12:10:17
Should mediators (and by extension, the view components that they instantiate) be crated by the StageMediator?

T
8  Announcements and General Discussion / Getting Started / Can proxies use other proxies for global settings? on: December 15, 2009, 01:36:39
According to this thread (http://forums.puremvc.org/index.php?topic=1357.0) is it recommended that global settings are stored in their own, I'm assuming static, proxy.

Would this be a good place to store the connection parameters for remote proxies which point to the same server?

Thanks.
9  Announcements and General Discussion / Getting Started / help setting up View Components... on: December 14, 2009, 02:21:45
I'm setting up my first PureMVC (Flash / AS3) View Component and am a little unclear as to how to set it up. I want a login form that takes name and password and posts it to an ASP.NET web service via a remote proxy.

My thinking goes along these lines...

I first create a class called LoginForm. Then create an instance of the Mediator class called myLoginFormMediator. MyLoginFormMediator creates an instance of LoginForm called myLoginForm. Then it adds an event listener to myLoginForm's submit button.

The mediator will have a function that sends data from myLoginForm directly to myLoingFormRemoteProxy which transacts with the web service. On failure to authenticate a notification goes back to myLoginFormMediator (which it knows to listen to) which in turns updates the LoginForm with a failure message. On successful authentication the remote proxy sends a notification to the stage (not myLoginFormMediator) to advance to the home page, or we load a new swf called home page or whatever.

My overall question is: am I on track here?

Some specific questions are:
- do I create a LoginForm class or simply a Form class and subclass it for each type of form I use in my app? or can I handle most of what I need through concrete instances of a single, global Form class?

- where's the best place to handle initial validation? I'm assuming in myLoginForm but maybe it should be the mediator? (assume I already do validation server-side)

- Is there an advantage to going to a command instead of directly coupling the mediator and the remote proxy?

(Bonus question, extra samaritan points) If all of this is handled through a single web-service, I'm curious if people tend to set up a different proxy for each type of transaction sent to the service (that way you could reroute certain functionality to other resources) or if it's all just in one mammoth proxy which divides the commands to different URLs? Or, (and this is beyond the scope of PureMVC) if you just pass the command name to the Web Service and all the data is split and rerouted server-side?

I don't mean to ramble here, I'm just casting a line to see what people's overall thoughts are on how this works. I have read the Best Practices document twice and will keep reading it until it really starts to click. Again, the most confusing area to me right now is how UI components are setup so any help would be appreciated.

Thank you!



Pages: [1]