2009/2/10 Adam Tuttle <[email protected]>:
> You may have just gone over my head. As I said earlier, I've not done any
> MG:Flex -- and in fact I was basing my answers on the XML architecture for
> MG:CF.

Reverse-snap- I've never used the CF version, for my sins :-)
I'm hoping enough of the concepts translate across for us to
understand each other...

> It looks like your example is the equivalent of the onApplicationStart,
> onSessionStart, etc events in MG:CF.

Yup, spot on.

> For me, the biggest "problem" I see is that you're _not_ broadcasting a
> message that says, "I need X piece of data" or "I need to check if the user
> is logged in" -- you _are_ broadcasting "I'm running `Foo` event" and the
> various controllers are configured to run for the given event.

Yup....

> As I understand the MVC pattern, the idea is that controllers know what they
> can do and listen for someone asking for those things to be done -- it's all

Ah ha. And this why the main view sends an event saying 'start up',
and you map (with eventHandlers) that to per-command events ?
So every command method has an associated event ?

> ... is that the controller knows which events exist and which functions to
> run. In doing so, you're giving up the separation between view and
> controller, and you might as well instantiate and use your model objects
> right from the view.

Well, this knowledge is in the MG configuration, not the controller, no ?
In Flex, the relevant properties from the model are injected to the
view and then update automatically through Flex's data binding.

> From a coding standpoint, the problem with that organization is that when
> you add a new event that needs to use some existing business logic, not only
> do you have to write the event configuration, but now you also have to go
> back and update the various controllers to respond to that event.

Well, I'd have to update the MG config to send the new event to the
existing controller...

> In "my"
> proposed organization, you just write the event configuration and broadcast
> the message corresponding to the business logic you want to use, and there
> is no need to update controller configuration.

Can you give an example of when you'd write a new event (by which I
think we mean a user action, like clicking a button, right ?) that
needs to reuse business logic, but doesn't also need new business
logic ?
If I'm adding new logic, I'm going to be editing the config. anyway,
so may as well 'just' add another listener to the existing code as
well as creating the new one.
If I'm only reusing existing logic, they'll be an existing event.

Maybe you mean things like:
There is an event that is mapped to two different controllers/methods
i.e. they both listen to the same message broadcast.
Now I need to get just one of those methods to fire when something else happens.
Would I not need to create a new event, regardless of which way it's done ?

> recuse myself from the conversation and let someone who understands it
> better respond. ;)

Speaking of which, where are all the MG:F users and developers ?

-- 
Tom

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "model-glue" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/model-glue?hl=en

For more about Model-Glue, check http://www.model-glue.com .
-~----------~----~----~----~------~----~------~--~---

Reply via email to