Explore chapters and articles related to this topic
Event-Driven Programming
Published in Julio Sanchez, Maria P. Canton, Software Solutions for Engineers and Scientists, 2018
Julio Sanchez, Maria P. Canton
A new programming model is necessary to accommodate this mode of interaction between an application and the system code. The model is sometimes called event-driven programming. In event-driven programming, synchronization between the operating system and the application is in the form of program events. For example, when the user changes the size of an application’s window (a user event), the operating system takes the appropriate action and then notifies the application code (a system event). The application, in turn, may decide to take its own action to update its display area, or it may decide not to take any action at all. In either case, it returns control to the operating system. The event-driven model, although simple and effective, can appear odd to a programmer used to working in DOS. In the case of a Windows program, the application’s code is no longer a sequential set of instructions, but a series of blocks of code which execute when the corresponding message is received.
Standardization of IoT Ecosystems
Published in Bharat Bhushan, Sudhir Kumar Sharma, Bhuvan Unhelkar, Muhammad Fazal Ijaz, Lamia Karim, Internet of Things, 2022
Hubert Szczepaniuk, Edyta Karolina Szczepaniuk
In addition to programming languages, programming paradigms are also crucial in the field of application development. Programming paradigms define the structure and principles on which an application algorithm is based. Examples of paradigms are imperative programming or object-oriented programming. When analyzing real IoT projects, it is possible to distinguish programming paradigms that are most often used in this environment. In particular, the following specific programming approaches used in the implementation of IoT solutions should be distinguished (see e.g. [25]):Dataflow programming – the programming paradigm according to which the source code is oriented toward modeling the dataflow between individual operations that transform data. Dataflow programming can facilitate asynchronous dataflow through multiple nodes that handle data from IoT sensors (see e.g. [33]). In the scientific literature, there are concepts based on the assumptions of distributed dataflow in IoT application programming (see e.g. [34, 35]).Event-driven programming – based on the concept in which the control flow in the application depends on events such as user actions or receiving data from IoT input sensors. It is possible to implement a concurrency model and distributed communication (see e.g. [36]). It should be emphasized that recent studies have highlighted possible security problems related to the application of event-driven programming paradigms in the automation of smart houses [37].Functional programming – the implementation of the source code is oriented toward functions that are treated as fundamental values (similar to Int or Float values). When building an algorithm, functions can be passed to other functions as parameters, and they can be returned as a result of other functions. The research shows that the size and complexity of the source code that processes, collects, and interprets data from IoT sensors can be reduced using functional programming techniques [38].Aggregate programming – based on the concept of a computational field being a unified abstraction of construction and inference on large self-organizing networks of devices (see e.g. [39–41]). Aggregate programming enables the implementation of complex distributed services and safe encapsulation, modulation, and composition of services in the IoT environment [41].
GearWheels: A Software Tool to Support User Experiments on Gesture Input with Wearable Devices
Published in International Journal of Human–Computer Interaction, 2022
Ovidiu-Andrei Schipor, Radu-Daniel Vatavu
One popular strategy to implement asynchronous software applications is event-driven programming, where the processing flow is dictated by the occurrence of external events, eg, data from sensors (Schipor et al., 2019b), messages delivered by third-party applications and services, and user input for interactive systems (Schipor et al., 2019b). Event-driven programming enables low coupling among the multiple intercommunicating components of a system. Events are encapsulated in the form of messages, which implement notifications that travel in the software architecture (Chandy, 2006). During the inter-component communications, some of the software components act as producers and generate events, while others as consumers that receive messages and process the corresponding events (Moxey et al., 2010). Since events reflect changes in the state of the producers, they are strongly coupled with their source. Event-driven software architectures for implementing interactions with computer systems, such as Euphoria (Schipor et al., 2019a) for interactions in smart environments, and SAPIENS (Schipor et al., 2019b) for peripheral interaction, specifically require the implementation of producer and consumer software components according to their operation logic and data flows.
Traffic impact analysis of inspection area site selection at a foreign trade container terminal
Published in Maritime Policy & Management, 2020
Yong Zhou, Ying-En Ge, Wenyuan Wang
The proposed integrated framework has an open architecture consisting of three layers, that is, system layer, assist layer and application layer (see Figure 4). These layers are bounded by Visual Basic for Applications (VBA) interfaces, which is an implementation of Microsoft’s event-driven programming language, Visual Basic 6.0, and its associated integrated development environment. As major components of this framework, an Arena-based Simulation System (ASS) and a Geographical Information Database (GID), are built respectively into the system layer and the application layer. The ASS is constructed for process design and evaluation with a given terminal configuration. Incorporating VBA into the ASS allows for tighter integration by extending VBA interface to include the objects, methods, properties and events in the ASS. In addition to the augmentation of the ASS model logic, with the inclusion of VBA, the ASS and GID can also realize data and information interactions conveniently. Matlab procedures in the assist layer support the system layer with the functions of shipping schedule generation, truck routing optimization and traffic flow statistics. Since the system layer can interpret terminal configuration parameters from the application layer via the database and simulation model, we only need to set up various container terminal configurations by manipulating the application layer, and the geographical information system (GIS) employed can assist us in planning and modifying container terminals accurately.
Application of social game context to teaching mutual exclusion
Published in Automatika, 2018
Miroslav Popović, Klemo Vladimir, Marin Šilić
Geppeto paradigm [28,29] supports event-driven programming model well suited for programming over graphical interfaces, like buttons and textboxes. Only a subset of the Geppeto’s programming elements is adopted and customized for the purpose of mutual exclusion. Interface to programming is exposed through buttons – central graphical constructs commonly recognized by non-programmers as elements listening to user clicks and triggering designated action upon click. While in traditional Web applications button-assigned actions are fixed and their programming is out of reach of end-user, Geppeto allows end-user to define a sequence of actions which gets assigned to a listening button. In response to a certain type of event, typically a click on the listening button or a specific signal from the run-time environment, the listening button triggers execution of a defined sequence of actions.