[Arp] Pizza example: question about duplicate addEventListeners
Aral Balkan
aral at ariaware.com
Fri Feb 25 00:27:13 PST 2005
Hi Chris,
The Controller is listening for the event in order to map it to the
OrderPizzaCommand so it can carry out business logic in response to it
(in this case, to call a remote method to actually order the pizza.) The
Application form is listening to it because it needs to perform some
*presentation*-related logic in response to it (in this case, display
the preloader clip). In ARP, we call the first event a System Event and
the second one a View Event, based on whether the Application Controller
or a form in the View is listening to it (either the form itself or a
parent form.) Here you can see that an event can be both a View Event
and a System Event and, in reality, an event is an event is an event.
The System Event/View Event terminology is just a distinction we make
when talking about things to clarify our intent.
hth,
Aral
Chris Velevitch wrote:
>In the Pizza example, I see event listeners for the same event
>appearing in 2 locations:-
>
>controller.as: app.orderForm.addEventListener ( "orderPizza", this );
>Application.as: orderForm.addEventListener ( "orderPizza", this );
>
>I'm a newbie to ARP and I just want to understand why?
>
>
More information about the Arp
mailing list