PureMVC Architects Lounge

Announcements and General Discussion => General Discussion => Topic started by: jeffyamada on November 18, 2009, 01:46:16



Title: Mediator or Proxy
Post by: jeffyamada on November 18, 2009, 01:46:16
I'm writing several methods in javascript to handle the scroll position of very tall flash piece. I'm using PureMVC within flash and am wondering if I should interact with the javascript functions using a Proxy or a Mediator.

My initial instinct was to use a Proxy since it will be setting and getting data, but it occurred to me that none of this data is "model" data, and the scrollbar and browser scroller are actually more UI components.

Any guidance would be hugely appreciated, many thanks in advance!


Title: Re: Mediator or Proxy
Post by: Joel Hooks on November 18, 2009, 02:07:14
You can mediate the surrounding HTML wrapper on the view. That's how I'd approach it anyway. If there was data transfer happening, then I'd put that on the model, but conceptually I think you're on the right track here.


Title: Re: Mediator or Proxy
Post by: jeffyamada on November 18, 2009, 02:13:13
Awesome, thanks! I think since I'm only transferring information like current scroll percentage I'll opt to mediate. Thanks for the reassurance!