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 / 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
17  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.
18  Announcements and General Discussion / Getting Started / Re: help setting up View Components... on: December 15, 2009, 09:21:43
Tremendously helpful.

Thanks Cliff!
19  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 [2]