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

Pages: [1]
Print
Author Topic: Login Sample using Flex, WebORB and PureMVC  (Read 16245 times)
sectore
Courseware Beta
Full Member
***
Posts: 29



View Profile WWW Email
« on: August 10, 2007, 12:02:31 »

Do you know the Cairngorm LoginSample from Alex Uhlmann's blog?

On my blog you will find a Login Sample (incl. full source) based on it using WebORB for PHP and PureMVC instead of Cairngorm.

P.S. Any feedback or suggestion are welcome ;)

-sectore
Logged
puremvc
Global Moderator
Hero Member
*****
Posts: 2871



View Profile WWW Email
« Reply #1 on: August 10, 2007, 02:19:49 »

Beautiful demo!   The link says CairngormLoginExampleWebORB.zip instead of PureMVCLoginExampleWebORB.zip but the contehts are correct.

-=Cliff>
« Last Edit: August 10, 2007, 02:23:25 by puremvc » Logged
sectore
Courseware Beta
Full Member
***
Posts: 29



View Profile WWW Email
« Reply #2 on: August 10, 2007, 11:04:42 »

@Cliff: Thanks for your feedback. The name of the link has been fixed ;)

-sectore
Logged
Gradiation
Port to CSharp
Full Member
*
Posts: 41


View Profile Email
« Reply #3 on: January 05, 2008, 08:11:29 »

Hi Sectore,

I am currently in the process of porting this demo over to silverlight, along with the C# PureMVC port i'm working on. But i'm having a problem which i'm not sure weather it is the demo, or my port.

My question is this.

From what i can tell, the ApplicationMediator is registered with the Facade via the ViewPrepCommand which is triggered by the application startup code telling the facade to notify observers of an APP_STARTUP notification.

In the ApplicationMediators listNotificationInterests method, it says that it is interested in the APP_STARTUP, which i beleive it uses to setup its sub views.

Now the thing that i am having dificuilty with is that the ApplicationMediator is registered by the APP_STARTUP command, and is interested in the APP_STARTUP but my ApplicationMediator doesn't currently receive notification (i'm guessing because it's not in the list when the APP_STATUP notification was broadcast)

So should the ApplicationMediator be subscribing to the APP_STARTUP notification? or is there something wrong with my port that i can't add mediators during the handling of a notification which should then receive the notification themselves?

I hope this makes sence.

Many thanks

Matt
Logged
puremvc
Global Moderator
Hero Member
*****
Posts: 2871



View Profile WWW Email
« Reply #4 on: January 05, 2008, 08:21:16 »

ApplicationMediator should not be interested in APP_STARTUP if that is the note that triggers the command that creates and registers ApplicationMediator.

Is it this way in the repository? Or just with the app currently zipped and posted in the forum?
-=Cliff>
Logged
Gradiation
Port to CSharp
Full Member
*
Posts: 41


View Profile Email
« Reply #5 on: January 05, 2008, 08:29:41 »

This was from the zip file, i'll have a look in the repository too.

Matt
Logged
Gradiation
Port to CSharp
Full Member
*
Posts: 41


View Profile Email
« Reply #6 on: January 05, 2008, 08:33:56 »

This demo isn't in the repo is it? The only one i can find is the book store.
Logged
sectore
Courseware Beta
Full Member
***
Posts: 29



View Profile WWW Email
« Reply #7 on: January 05, 2008, 09:17:48 »

Hey guys,

thanks for your feeback, you're absolutely right. As mentioned above, none of the Mediators should be interested in the Notification called "APP_STARTUP", because it's for registering Proxies and Mediators using the "ApplicationStartUpCommand". My reason for this was changing the workflowState within the "ApplicationProxy" at the start of the App (and my beginning with PureMVC in Juli / August last year ;) ).

I think changing the state of the "ApplicationProxy" will be a better job for a Command than for a Mediator. I'll refactor the source and update the repository as well as the *.zip on my blog.

-sectore
Logged
sectore
Courseware Beta
Full Member
***
Posts: 29



View Profile WWW Email
« Reply #8 on: January 05, 2008, 10:06:02 »

It's done ;)

-sectore
Logged
Gradiation
Port to CSharp
Full Member
*
Posts: 41


View Profile Email
« Reply #9 on: January 05, 2008, 01:31:05 »

One final thing, where does the new command get triggered to set the initial state?
Logged
sectore
Courseware Beta
Full Member
***
Posts: 29



View Profile WWW Email
« Reply #10 on: January 06, 2008, 08:47:34 »

Gradiaton,

the "workflowState" is initialized executing the "ViewPrepCommand" after registering the Mediators. Please grab the latest source for this update.

-sectore
Logged
Gradiation
Port to CSharp
Full Member
*
Posts: 41


View Profile Email
« Reply #11 on: January 06, 2008, 09:04:15 »

Cool,

Just one more final thing =)

Wouldn't it be better off being:

:
sendNotification(ApplicationFacade.APP_STATE, ApplicationProxy.VIEWING_LOGIN_SCREEN);
« Last Edit: January 06, 2008, 09:07:22 by Gradiation » Logged
sectore
Courseware Beta
Full Member
***
Posts: 29



View Profile WWW Email
« Reply #12 on: January 06, 2008, 09:22:18 »

Gradiaton,

that's a good idea - I've updated the source.
Thanks again for your feedback ;)

-sectore
Logged
Gradiation
Port to CSharp
Full Member
*
Posts: 41


View Profile Email
« Reply #13 on: January 06, 2008, 09:54:35 »

No problem, it's a great demo.

Keep an eye out for the silverlight port coming VERY soon ;)
Logged
Pages: [1]
Print