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]
1  Announcements and General Discussion / General Discussion / Re: 4-things-to-hate-about-puremvc ??? on: October 09, 2008, 01:35:44
@Cliff: Thank you for your valuable comment. True on bindings, and I agree completely, that binding directly from view into model is a bad thing.

@Jason: I am sorry to have given the impression that your name should be a restaurant. I am neither Scottish, Irish or English. I guess you see that often.
2  Announcements and General Discussion / General Discussion / Re: 4-things-to-hate-about-puremvc ??? on: October 09, 2008, 12:34:12
Greetings. I am the author of the blog post linked to. I guess this is like going into the cave of the lion, but I think you guys are being overly sensitive and a bit unfair here.

@Jason: Give it a break! Your comment has been published without any problems whatsoever. Even though the internet does provide some kind of anonymity, do try to avoid becoming personal. It doesn't help the conversation.

@Cliff: Why is it wrong to voice ones experiences of puremvc if they are bad? Are my experiences wrong? Is it not correct, that puremvc puts an emphazis on keeping puremvc portable to other platforms, hereby sacrificing using platform specific frameworks as core parts of the framework? Is it wrong for people out there, to discuss this, and not totally agree on this as a "good thing"?

I encourage all to read both Jasons comment on the actual blogpost AND the other comments there too. Not all agree. Nor should all agree.
3  Announcements and General Discussion / Architecture / Where to place flex validators? on: June 26, 2008, 05:48:57
We have a flex application with many screens, and need to programmatically run all validators in all screens, before doing a specific server action. Hence, we need to have all validators registered somewhere central, to be able to iterate them and execute validate on each. Only if all answer OK, will we execute the rest of the command. The problem is:

* a flex validator is a view-thing: It is defined in mxml, and heavily bound to a specific input field
* the action, which needs to check all validators before executing logic, shall be in a command, as it is business logic

So, where do we place the validators? We can see at least two solutions:

1) Let mediators "register" their validator instances, by putting them into the model in a list, somewhere

This way the command can easily access them all. Bad thing is, that it seems wrong, to keep references to validators in ones model. Maybe this can be made a bit better, by hiding them through some model interface.

or,

2) Let command retrieve all mediators by name, and execute a validation on each, possibly through an interface, if the particular mediator implements that validator interface.

But is it good to have a command retrieve mediators?

Which one is best? Are there other, better solutions to this problem?
4  Announcements and General Discussion / Getting Started / Re: StartupCommand or put it in ApplicationFacade.startup() ? on: June 13, 2008, 06:56:41
Okay, thanks for the reply.

I understand what you are saying. My reason for asking is, that I feel strange when putting something like Mediator-to-View gluing and Proxy setup into a Command. In my understanding, commands will contain business logic (in combination with my model proxies), and this framework setup in the StartupCommand isn't businesslogic at all.

In addition to this, I could see that my ApplicationFacade already contained some framework-bootstrap code (in initializeController()), and some of it was in the StartupCommand. Hence, I had this framework bootstrap partly in the facade and partly in a command.

Wouldn't it be better to advice people on keeping the framework-bootstrap/glueing-it-all-together code inside the ApplicationFacade, and only put what is actual business logic into commands? I understand, that the setup process can be much more complicated than my little example is, but would it not always be possible to extract the "importing of model" from the registering of proxies and mediators?
5  Announcements and General Discussion / Getting Started / StartupCommand or put it in ApplicationFacade.startup() ? on: June 11, 2008, 01:35:47
I was wondering, why we are always doing a StartupCommand, which kind-of bootstraps the whole mediator and proxy setup? Couldn't we just do it directly in the ApplicationFacade.startup method?

Could this StartupCommand:

:
public class ApplicationStartupCommand extends SimpleCommand {
    override public function execute(notification : INotification) : void {
        facade.registerProxy(new XyzProxy());
        var app : FooApp = notification.getBody() as FooApp;
        facade.registerMediator(new BarMediator(app.bar));
        sendNotification(ApplicationFacade.GET_INITIAL_DATA);
    }   
}

not simply be replaced by this code, in the ApplicationFacade.startup method:

:
  public function startup(app : FooApp) : void {
      registerProxy(new XyzProxy());
      registerMediator(new BarMediator(app.bar));
      sendNotification(ApplicationFacade.GET_INITIAL_DATA);
  }

?
Pages: [1]