Discuss the benefits of event-driven programming. Contrast event-driven programming with procedural programming. Discuss how messages from other programs can be viewed as events. Give examples. Give examples of tasks that require the program to guide the user. Should programs be purely event driven, procedural, or a mixture of both? Why? Solution The benefit of event-driven programming is that it\'s very intuitive and naturally well-suited to applications whose control flow are based, not on its structure, but rather on internal or external events. This is why event-driven programming is so popular with GUI programming. Likweise, SOA and client-server architectures are naturally event-driven as well. We if we find contrast between Procedural and event-based then applications written in procedural languages execute by proceeding logically through the program code, one line at a time. Logic flow can be temporarily transferred to other parts of the program through the GoTo, GoSub, and Call statements, directing the program from beginning to end. In contrast, program statements in an event-driven application execute only when a specific event calls a section of code assigned to that event. Events can be triggered by keyboard input, mouse actions, the operating system, or code in the application. For example, consider what happens when the user clicks a command button named Command1 on a form. The mouse click is an event. When the Click event occurs, Visual Basic executes the code in the Sub procedure named Command1_Click. When the code has finished running, Visual Basic waits for the next event. Messages from other programs/threads can be seen as events, as they trigger some instance of code to execute..