InterviewSolution
| 1. |
What Are The Advantages Of The Event-delegation Model Over The Event-inheritance Model? |
|
Answer» Event-delegation model has two advantages over event-inheritance model. a)Event delegation model enables event handling by objects other than the ones that generate the events. This allows a clean separation between a COMPONENT's DESIGN and its use. b)It performs MUCH better in applications where many events are GENERATED. This performance improvement is DUE to event-delegation model does not have to be repeatedly process unhandled events as is the case of the event-inheritance. Event-delegation model has two advantages over event-inheritance model. a)Event delegation model enables event handling by objects other than the ones that generate the events. This allows a clean separation between a component's design and its use. b)It performs much better in applications where many events are generated. This performance improvement is due to event-delegation model does not have to be repeatedly process unhandled events as is the case of the event-inheritance. |
|