Since most software systems provide their users with interactive features, building user interfaces (UI) is one of the core software engineering tasks. It consists in designing, implementing and testing ever more sophisticated and versatile ways for users to interact with software systems, and safely connecting these interactions with commands querying or modifying their state. However, most UI frameworks still rely on a low level model, the bare bone UI event processing model. This model was suitable for the rather simple UIs of the early 80's (menus, buttons, keyboards, mouse clicks), but now exhibits major software engineering flaws for modern, highly interactive UIs. These flaws include lack of separation of concerns, weak modularity and thus low reusability of code for advanced interactions, as well as low testability. To mitigate these flaws, we propose Interacto as a high level user interaction processing model. By reifying the concept of user interaction, Interacto makes it easy to design, implement and test modular and reusable advanced user interactions, and to connect them to commands with built-in undo/redo support. To demonstrate its applicability and generality, we briefly present two open source implementations of Interacto for Java/JavaFX and TypeScript/Angular. We evaluate Interacto interest (1) on a real world case study, where it has been used since 2013, and with (2) a controlled experiment with 44 master students, comparing it with traditionnal UI frameworks.Index Terms-user interface, user interaction, UI event processing, separation of concerns, undo/redo !
INTRODUCTION"Anytime you turn on a computer, you're dealing with a user interface" [1]. User Interfaces (UIs), and the user interactions they supply, pervade our daily lives by enabling users to interact with software systems. The user interactions provided by a UI form a dialect between a system and its users [2]: a given user interaction can be viewed as a sentence composed of predefined words, i.e. low-level UI events, such as mouse pressure or mouse move. For example, we can view the execution of a drag-and-drop interaction as a sentence emitted by a user to the system. This sentence is usually composed of the words pressure, move, and release, that are UI events assembled in this specific order. The humancomputer interaction community designs novel and complex user interactions. As explained by [3], "Human-Computer Interaction (HCI) researchers have created a variety of novel [user] interaction techniques and shown their effectiveness in the lab [...]. Software developers need models, methods, and tools that allow them to transfer these techniques to commercial applications." Currently, to use such novel user interactions in software systems developers must complete two software engineering tasks: (i) They must assemble low-level UI events to build the expected user interaction. For example, a developer must manually assemble the events pressure, move, and release to build a drag-and-drop. (ii) They have to code how to process suc...