Difference between revisions of "Event Driven Programming, Notifications"

From MorphOS Library

(Event Driven Programming)
m
Line 1: Line 1:
 
''Grzegorz Kraszewski''
 
''Grzegorz Kraszewski''
 +
  
 
==Event Driven Programming==
 
==Event Driven Programming==
Line 10: Line 11:
  
 
<center>''Fig. 1. Execution flow of an event driven program.''</center>
 
<center>''Fig. 1. Execution flow of an event driven program.''</center>
 +
  
 
==Notifications in MUI==
 
==Notifications in MUI==
  
 
==The Ideal MUI Main Loop==
 
==The Ideal MUI Main Loop==

Revision as of 21:47, 15 November 2010

Grzegorz Kraszewski


Event Driven Programming

The event driven programming is the natural consequence of invention and development of graphical user interfaces. Most of traditional, commandline programs work like a pipe: data are loaded, processed and saved. There is no, or limited user interaction (like adjusting processing parameters, or choosing one of alternative pathes). GUI changes it all. A GUI based program initializes itself, opens a window with some icons and gadgets, then waits for user actions. Fragments of the program are executed in response for user input, after an action is finished, the program backs to waiting. This way the program flow is determined not by the code, but rather by input events sent to the program by user via the operating system. This is the basic paradigm of the event driven programming.


Mzone eventdriven 1.png


Fig. 1. Execution flow of an event driven program.


Notifications in MUI

The Ideal MUI Main Loop