Hi!
I have the following scenario and haven't found any examples where this is done.
I have an account management application that sends out emails to users to confirm registration. In this email is a link to the account management application with an encrypted token used to verify that the user received the email.
The user uses this link to open the flex application and log in. Based on the account status, the flex application gets a signal telling it that the registration needs to be confirmed.
I wanted to get suggestions on how to implement this with puremvc and have the responsibilities in the right place.
Here's what I'm planning so far:
- AccountProxy receives signal from the server and sends a notification.
- ApplicationMediator reacts to the notification, getting the email token from the mx.core.Application.application.parameters Array.
- ApplicationMediator sends a new "confirmRegistration" notification with the data needed to confirm the registration.
- ConfirmRegistrationCommand reacts to the "confirmRegistration" notification and either calls the AccountProxy to confirm registration with the server, or if the email token isn't set (the user didn't use the email link to log in) sends notification to display a message to the user.
Something about it just seems odd, since the ApplicationMediator is involved only to pick up data needed to confirm the registration. Any suggestions on a cleaner solution?
Thanks!
Russ