On 11/19/05, Peter Farrell <[EMAIL PROTECTED]> wrote:
> Yes, you can announce events in your listeners, however you cannot clear the 
> event queue (well, you could if you access some "untouchable" stuff in the 
> request scope).

But you can in a filter - which is really just a different type of
listener. That's an area of confusion for a lot of people coming to
Mach II: should I use a listener or a filter or a plugin? And, since
you can create custom invokers for listeners, it's easy enough to
provide the EventContext to a listener and then it *can* change the
event queue, just like a filter - the distinction is very blurred.

> The ability to announce events in listeners is so you can leverage 
> event-mappings -- which are extremely useful.

Model-Glue provides this through dynamic results and static
result-to-event mappings. The difference is that in Mach II, if you
announce an unmapped event, it will be handled without the XML giving
any indication that such a path is possible - whereas in Model-Glue,
the mapping is both explicit and complete in the XML (if you add an
unmapped result, no new event will be executed - I can't remember
whether you get an error).

> Theorectically, you could write an entire app in listeners (which would be 
> very wrong), but it is totally possible.  I believe you could write an entire 
> app in MG's controllers as well -- couldn't you?

Yes. However, Model-Glue documentation tends to emphasize the
controller / model distinction and even the very names emphasize that.
Mach II's listeners are not clearly "labeled" as part of the
'controller' and therefore people do blur listener and model. Compound
that with the filter and plugin nomenclature and it's easy to see why
folks get confused.
--
Sean A Corfield -- http://corfield.org/
Got frameworks?

"If you're not annoying somebody, you're not really alive."
-- Margaret Atwood

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Find out how CFTicket can increase your company's customer support 
efficiency by 100%
http://www.houseoffusion.com/banners/view.cfm?bannerid=49

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:224746
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to