What Is Event-Driven Programming?
Event-driven programming is a paradigm used to structure a program around various events. These events include user input events in graphical user interfaces and networking requests from websites and other online properties.
Until the invention of graphical user interfaces, most programs simply waited for users to enter a command through their keyboard. In the meantime, the program would simply wait. The creation of graphical interfaces and the windows paradigm, however, forced developers to rethink their earlier strategies. Because users can click virtually anywhere, the program must be read for nearly any input. In addition, information isn't always entered in the same manner; event-driven programming makes it easier to handle a diverse range of inputs.
Event-driven programming is significantly harder for beginners than other programming paradigms, so most instructional courses and books avoid teaching it at first. After gaining skills in more traditional programming techniques, however, most students are able to understand and use it.