PureMVC Architects Lounge

Announcements and General Discussion => Architecture => Topic started by: simbo on July 13, 2008, 07:21:37



Title: What's the right way of setting things up?
Post by: simbo on July 13, 2008, 07:21:37
Hi. I'll be honest, I am trying to get my head round this concept. I think I understand it but would really appreciate some clarification.

Part of my app loads external images from a folder. Is this a reasonable way to go about that?

1. startup command sends notification to load assets (ApplicationFacade.LOADASSETS("url.jpg"))
2. the command has been registered in the facade so when that notification is sent the LoadAssetsCommand is fired up
3. From the LoadAssetsCommand class an Asset class is instantiated and an AssetMediator mediator is registered with the facade.
4. From the LoadAssetsCommand command the notification is sent to add the asset (ApplicationFacade.ADDASSET) and the asset itself is passed as a parameter
5. the StageMediator mediator handles the ADDASSET notification and actually adds the asset to the stage

now what? Do I use the Asset class to actually load in the image? Does that sound right? Or should I be using a proxy class to actually load the image and then pass it to the Asset? Or should I create all the functionality inside a LoadAssetProxy including URLRequest and Loader objects?
I'm a little confused, this is the first project and I'm trying to get things clear in my head!

Any help would be greatly appreciated because I'd really like to fully understand this.