Advantage of event-delegation model over the earlier event inheritance model?

What is the advantage of the event-delegation model over the earlier event inheritance model?

There are two advantages of event-delegation model over event-inheritance model.

First – Event-delegation enables the handling of events by objects other than the ones which generate the events. It is a clean separation between design and usage of a component.

Second – It's performance is much better in applications in which many events are generated. This improvement of performance is due to the fact that the unhandled events need not be repeatedly processed, which is the case of event-inheritance model.

What is the advantage of the event-delegation model over the earlier event inheritance model?

Event-delegation model allows a separation between a component's design and its use as it enables event handling to be handled by objects other than the ones that generate the events.

As event-delegation model does not have to repeatedly process unhandled events, it performs much better in applications where many events are generated. This is unlike the event inheritance model.
Difference between Boolean & operator and the && operator
A & B In this, both the operands A as well as B are evaluated and then ‘&’ is applied to them...
What is a task's priority and how is it used in scheduling?
A priority is an integer value. Based on this priority the scheduler determines when to execute a task.....
Difference between preemptive scheduling and time slicing
In time slicing methods, a task executes for a predefined slice of time......
Post your comment