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

Show Posts

* | |

  Show Posts
Pages: 1 [2]
16  Announcements and General Discussion / General Discussion / Re: Reusing components as subcomponents / dynamic mediators on: July 23, 2007, 02:02:45
Cliff,
I just try to code all the above cases, but in all I see some disadvantage. First of all what's the goal of this discussion: have reusable components with own Mediator.

Now if you try to code cases 1 and 2, you will see that there are a lot of Mediators code duplicated.
For example: MyComponent is a component that I use in a lot of popup window, each time that I open a window I have two solutions:
- the screen mediator open the window  and create a Mediator for the windows, and it create a MyComponentMediator. But if I don't need the Mediator for the window, I must to add a class only for create MyComponentMediator.
- the screen mediator open the window and create a Mediator for the component that is inside the window.

I think that the second solution is better, but why duplicate the code for register the mediator?
I understand your point that pureMVC is hidden for the components, but at the same time I think that to have the way for autocreate the mediator for reusable components can be a cool feature, how make this? I don't know, the only solution that I have found (for now) is the example that I have posted.

Daniele



17  Announcements and General Discussion / General Discussion / Re: Reusing components as subcomponents / dynamic mediators on: July 23, 2007, 09:47:17
Cliff,
I see your point, but let me know if I have undestand all, we can have differents cases to cover:

-1. in the screen we have two instance of the same component and it can be used in more screens. All components instance must have own Mediator class. The Screen Mediator create and register the new Mediators for the all components, each will have different name.

-2. I have a button that create popup window that can be used in more screens, the Screen Mediator create the popup and register the new Mediator.

-3. at the end there are cases when a component or popup don't need own Mediator, because can be controlled by screen mediator.

I think that a example that cover all will be very usefull for the people that just learing PureMVC.

Daniele
18  Announcements and General Discussion / General Discussion / Re: Reusing components as subcomponents / dynamic mediators on: July 22, 2007, 07:41:03
Hi Cliff, hi Don

I have a similar situation, I have a component that can be reused in more parts.
I have made a little experiment I would like to have your feedback and how this case can fit better in the framework.

In my solution the component create own Mediator, the problem is how remove the Mediator when the component end his live, I have tried with FlexEvent.EXIT_STATE and FlexEvent.REMOVE events but witout success.

The code and compiled swf cn be downloaded here:
http://dev.ugoletti.com/puremvc/DynamicMediator.zip
19  Announcements and General Discussion / General Discussion / Re: first project with pureMVC on: July 22, 2007, 07:00:18
Hi Cliff,
I have update the demo:

http://dev.ugoletti.com/puremvc/ApplicationSkeleton.zip

Changelog:
- updated to pureMVC 1.5
- now the ApplicationFacade.getConfigProxy() and ApplicationFacade.getResourceProxy() are static methods
- removed unused code

Daniele
20  Announcements and General Discussion / Public Demos, Tools and Applications / Re: Flash Develop 3 Project Template on: July 19, 2007, 06:14:28
What were the steps you took to install this plugin mod? Are you installing a FD3 over FD2? Hopefully my modification will make it into the main source soon :)

No, I have unintalled FD2 before installa FD3.


Daniele
21  Announcements and General Discussion / Public Demos, Tools and Applications / Re: Flash Develop 3 Project Template on: July 18, 2007, 04:38:14
Hi Michael,
I have tried to install your project manager I have a series of errors when FD start and the project plugin are not loaded.
I just using FD3 beta 2, this is my configuration:
Win XP sp 2 italian version
Intel Centrino 1,2ghz
1Gb Ram
FD installation path: C:\Programmi\FlashDevelop

Let me know if you need other info.

Best
  Daniele
22  Announcements and General Discussion / General Discussion / Re: first project with pureMVC on: July 18, 2007, 02:50:03
Daniele,

I will be happy to help with getting some documentation together and present it here as a demo people can actually get started from. It might be helpful to create a second demo based upon this one, to show the direction someone might take to use it.

You can email me at cliff@puremvc.org

thanks I will contact in private.

Also, I see you're using Flash Develop. I haven't tried it yet, but it looks good. Did you use Michael Ramirez's PureMVC Project plugin?

unfortunaly no, I have tried but I get a lot of errors, I don't have time to write to him but I will do ASAP.


Daniele
23  Announcements and General Discussion / General Discussion / Re: first project with pureMVC on: July 18, 2007, 02:24:36
  • Zip the project folder rather than its contents, so when someone unzips it, they get one folder, and don't have to create one first. This cost me a Version point on PureMVC  :P



ok

  • Move the business package under Model. Only a Proxy talks to it, so it shouldn't clutter the namespace at the MVC level. (the CafeTownsend demo has it at that level to make friendly with the Cairngorm folk, but it's not really a recommended practice I'd want to perpetuate with PureMVC.

    The Model tier is roundly in charge of communicating with remote services if necessary. It could be done inside the Proxy, as with CodePeek, or with a Business Delegate, as you've done here, but either way it will happen within the Model tier.
this means that we have model/business folder with delegate files.

Further, the Delegate pattern is only really useful to us if multiple Proxies will communicate with the same service the Delegate talks to, although it's not improper to use it if only one Proxy talks to it. It's a good division of responsibility, and I'm not suggesting its removal, only noting here for posterity that a good way to begin an app is to have the service logic inside the Proxy, and then later refactor it into a Delegate at the first call for reuse.

you are right, but in this example we have 2 proxy that use the same delegate

  • And for the same reason, move the flex/helpers package to  model/helpers, since it is the Proxies that use it to parse their data files.

ok

If you wouldn't mind writing a little something about it, I'd love to feature it as a demo. It would be most helpful for people to get a feel for how to turn it into their own thing.

sure, I have posted the example because I think that can be usefull for others. I will try to write something but my english isn't so good :)
Where I can send the final file?

Daniele
[/list]
24  Announcements and General Discussion / General Discussion / Re: first project with pureMVC on: July 17, 2007, 09:50:35
Cliff,
there is the attach with source in my last post, but you can see it online:

Demo:
http://dev.ugoletti.com/puremvc/ApplicationSkeleton.swf

Source:
http://dev.ugoletti.com/puremvc/ApplicationSkeleton.zip
25  Announcements and General Discussion / General Discussion / Re: first project with pureMVC on: July 17, 2007, 07:46:52
Hi Cliff,
I have made a little demo called Application Skeleton and I have implemented the startup sequence that read some resources:
- a configuration file
- a XML with localized text
- and other.

In the main view there is a example how to read localized text from the proxy.
I don't know if I have made all well, but I hope that it can help other people.

Best
  Daniele
26  Announcements and General Discussion / General Discussion / Re: first project with pureMVC on: July 14, 2007, 04:46:26
Hi Cliff,
I have other questions for you:

- my Flex applycation read a config file using a Proxy. When a part of application (Mediator or other Proxy) need to get a config value can retrieve the proxy and call it?
ie:
configProxy = configProxy ( facade.retrieveProxy( configProxy .NAME ) );
configProxy.getValue('myValueKey');

- my application have a chat build with Flash Media Server, I think that also in this case I must to have a proxy class that make the connection with FMS and talk with it, right? But when a Mediator need to send a message to FMS (ie send the chat text) is better that retrieve the Proxy and call a method or send a notification for the proxy?

Thanks
   Daniele
27  Announcements and General Discussion / General Discussion / Re: first project with pureMVC on: July 09, 2007, 07:59:37
Hi Cliff,
thanks a lot for you help!
28  Announcements and General Discussion / General Discussion / first project with pureMVC on: July 07, 2007, 05:18:01
Hi Cliff,
I just starting a new project and I have chosen PureMVC instead Cairngorm. I have read all documentations and play a but with the demo (very usefull, thanks).
Now in this project I have some points and I would like to have a suggestion what's the best way to achieve:
- the APP_STARTUP must to read a XML config file
- I must to wait that the config is loaded, parse it and read some resources (other XML and background images)
- when all is loaded I can show the view.

What is the best way to make it?

Best,
   Daniele
Pages: 1 [2]