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: stage logic in a proxy  (Read 7375 times)
tobydeh
Port to Python
Sr. Member
*
Posts: 52


View Profile Email
« on: March 07, 2008, 06:06:01 »

Hi Cliff,

David Knape did a presentation on PureMVC using a Gallery application he had built.

In this application he uses a Proxy to store Stage logic such as the Stage "resize" event along with the scale and align properties etc. I would have considered a StageMediator to be the correct place for this logic.

He also retrieves the Stage object from the Proxy and calls its update() method, I can't help but feel that he should have dispatched a STAGE_UPDATE notification instead of gaining reference to the Stage object?

What are your thoughts to his approach? Does the Stage need a Proxy?

Source is available here: http://bumpslide.com/blog/2008/01/16/puremvc_demo_src/
Logged
tobydeh
Port to Python
Sr. Member
*
Posts: 52


View Profile Email
« Reply #1 on: March 10, 2008, 02:37:55 »

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



View Profile WWW Email
« Reply #2 on: March 10, 2008, 10:33:47 »

Hi Toby,

I haven't looked through David's code, but what you are describing doesn't sound quite right.

I would suggest havig a look at the CodePeek AIR demo. There I'm now demostrating a utility called DesktopCitizen to persist and restore your window size, position, and maximized state.

Investigate the demo and the util and you'll see how I used a Proxy and a Mediator working together to pull it off. And how the model and view reponsibilities were divided.

-=Cliff>
Logged
tobydeh
Port to Python
Sr. Member
*
Posts: 52


View Profile Email
« Reply #3 on: March 10, 2008, 11:34:25 »

I understand where the responsibilities should be divided, I was just wondering what you thought about his approach!

Thanks anyway.
Logged
Pages: [1]
Print