PureMVC Architects Lounge

Announcements and General Discussion => Architecture => Topic started by: eco_bach on September 01, 2010, 01:56:28



Title: One Way Deep Linking, grabbing a querystring, when and where?
Post by: eco_bach on September 01, 2010, 01:56:28
Hi
A project requirement is that it be 1 way deeplinkable(a specific query string will load a section within the swf).

I have a URLProxy that I use for all external linking.
It makes sense to me to put the query string logic in this proxy.

So in the constructor, I check for a querystring, and then send a notification if it equals a predefined value.

One problem with this is that I'd like to predefine this query string key value I am checking against in an external xml file.

So another proxy, loads-parses this config xml, then the URL proxy checks against this.

Is there a better approach to what I am trying to do?





Title: Re: One Way Deep Linking, grabbing a querystring, when and where?
Post by: eco_bach on September 01, 2010, 02:53:11
Seems kind of kludgy, but this is working for me.
Would appreciate feedback.

1st need to ensure my popUpView has been added to the stage and let its mediator know. By default popUpView's alpha is 0 when 1st added to stage.

So, in my popUpView I dispatch a generic event when added.

Then in my popUpMediator's event handler I check for a predefined key value pair in my URLProxy.

if(urlProxy.parameters['promotion']=='1')openPopup();

Not sure if this is the 'best' approach, would appreciate any feedback.


Title: Re: One Way Deep Linking, grabbing a querystring, when and where?
Post by: puremvc on September 07, 2010, 07:38:48
Is the popup used for anything other than the promotion?

If not, wouldn't it be better to check that URLProxy and only add the popup if the key is present?

-=Cliff>