PureMVC Architects Lounge

Announcements and General Discussion => Architecture => Topic started by: eco_bach on July 15, 2010, 09:58:27



Title: Best Practice for trackinga user's history (breadcrumbs)
Post by: eco_bach on July 15, 2010, 09:58:27
I've used SWFAddress, but it seems full of quirks, and not fully implemented in all browsers. I don't necessarilly need deep linking, rather I simply need to track a users history as he she travels thru a flash application (user stays in application).

Any suggestions, desgin pattern recommendations, code examples?


Title: Re: Best Practice for trackinga user's history (breadcrumbs)
Post by: puremvc on July 15, 2010, 01:06:20
Try using Flex's built in BrowserManager class.

You can scope out the code for the Sea of Arrows player at http://seaofarrows.com/srcview to see how I handle it. There, I have both user- and app-generated navigation to deal with:

1) The app automatically generates navigation when it steps through tracks of a playlist you've selected
2) The user can generate navigation from playlist to playlist and song to song manually
3) The current navigation info has to be reflected in the url, so the user can bookmark any track or playlist and reenter the app at that point later. This way, I can deeplink to the tracks from my blog (http://blog.seaofarrows.com), or share the URL to a track in an email or a post like: http://seaofarrows.com/#P004/T044.

I chose BrowserManager because
A) It made more sense to use functionality that's already inside Flex as opposed to importing another lib
B) At the time I evaluated the two several years ago, there were issues with SWFAddress in terms of determining whether navigation came from inside the app or outside the app. BrowserManager lets you listen for one or the other or both. I don't know if this limitation still exists in SWFAddress or not, but it doesn't sound like you're having much joy...

HTH,
-=Cliff>


Title: Re: Best Practice for trackinga user's history (breadcrumbs)
Post by: eco_bach on July 15, 2010, 07:21:44
thanks Cliff