Difference between revisions of "Event Driven Programming, Notifications"

From MorphOS Library

(Event Driven Programming: Added flowchart.)
(Event Driven Programming)
Line 3: Line 3:
 
==Event Driven Programming==
 
==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.
+
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. The flowchart below shows the main execution loop of an event driven program:
  
[[File:mzone_eventdriven_1.png]]
+
 
 +
[[File:mzone_eventdriven_1.png|center]]
  
 
==Notifications in MUI==
 
==Notifications in MUI==
  
 
==The Ideal MUI Main Loop==
 
==The Ideal MUI Main Loop==

Revision as of 21:41, 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. The flowchart below shows the main execution loop of an event driven program:


Mzone eventdriven 1.png

Notifications in MUI

The Ideal MUI Main Loop