When a user submits a message, is it an action or event?
An event is just a specific time where actions happened, or activity went on. A situation includes an event, but also includes all the factors and circumstances involved with that event.
The difference between events and processes is simple. Event: the idea that results could be traced back to one thing happening. Process: the idea that results occurred because of cumulative, long-term efforts.
A user only provides actions (pressing on buttons, making selections in dialogs etc.)
These actions get [sometimes] converted into events by the underlying framework. Events can be understood, conceptually, as [notification] "messages" sent to methods which have, implicitly or explicitly, "registered" with the underlying framework to be notified [for a specific type of event]. In reality the framework merely invoke these methods with the appropriate arguments, and such an invocation is effectively an event.
The word event is also used to designate a particular type of events. For example one speaks of the "Change" event or "Submit" event of a given edit box or other UI element. In this sense the event is not a particular instance of an opportunity for the underlying method to be called, but rather the generic set of conditions which warrant the method to be invoked.
The user therefore doesn't really "submit a message" as phrased in the question, he/she takes some actions upon various UI elements, and these action [may] result in the fact that the framework detects a particular event type (or several). The framework then looks-up which methods are currently registered to receive the corresponding notifications, and the framework then invokes these methods, passing the proper arguments (which constitute a "message" of sorts for use by the method).
The main idea behind this model is for the application-level to provide the specific logic to handle events but not worry about following the system and user's every "move". The framework does this, and can be trusted to notify the relevant event handlers would a particular user action (or system condition such as a timer reaching its set time, a network packet being received etc. etc.) warrant such notification.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With