The term event It comes from the Latin eventus and, according to the dictionary of the Royal Spanish Academy (RAE), it has three great uses. In several countries Latin Americans, an event is a major event that is scheduled. This event can be social, artistic or sporting. For example: “Tonight’s event will face the two best teams of the tournament”, “Next month three events will be held at the Faculty of Law”, “The Rolling Stones concert has been the most popular event of the year”, “There are no more tickets for the poetry event on Friday”.
This use of the concept is contradicted, in a certain way, with the meaning of event that refers to something unforeseen or what can happen even if it doesn’t exist safety about. A eventuality It is something that escapes the limits of what is planned; an event like those mentioned above, instead, must be scheduled in advance.
The third use of the term encompasses both meanings: an event is a occurrence, one thing that happens. From this perspective, the event can be planned (“Everything has to be ready for tomorrow’s event”) or appear unexpectedly (“An event arose and I could not attend the meeting”).
For the science, an event is a phenomenon (an observable fact at a given moment) or a event that occurs at a given position and time (so it can be specified as a point in space-time).
In mathematics, it is known as statistical event to the subset of a sample space. These are the possible results that can be obtained from a experiment random.
For the computing, an event is an action that is detected by a program; this, in turn, can make use of it or ignore it. In general, an application has one or more threads of execution dedicated to attending the different events that are presented to it. Among the most common sources of events are user actions with the keyboard or mouse. It is worth mentioning that any program has the power to trigger its own events, such as communicating to the system that it has completed a particular function.
It is called event-led program to the one who changes his behaviour in response to events that take place during its execution. These are generally used when there is a series of activities external to the computer that must be registered, which are carried out asynchronously to the life of the application. The event is first detected by the system; the program in question will receive it only when it is ready, and then it will analyze it and see if it has any use for it.
In video games, there is a series of actions that take place independently of the player’s intervention, which are combined with the events triggered by the latter to complete the experience. In the mythical Tetris, for example, the pieces fall through the center of the playing space until the user presses one of the directional keys to change their course. In addition, it is possible to rotate them, depending on the version, in one direction or another. In short, the flow The game does not depend on the events, but they affect the outcome.
With regard to the design of the code of a program that accepts events, it is important to bear in mind that it will not always be possible to react to the event at the exact moment of its appearance; for this reason, you can register it and decide if it will be used later. An example, again in the realm of games: the main character is falling from a platform and the player presses the jump button; Developers can choose to save this data to make the hero jump once he hits the ground, or to dismiss the event for lack of consistency with the situation.