Unidad 3.- INFORME DE IMPACTO DE GÉNERO DE LOS PRESUPUESTOS
3.3. Informe de impacto de género
3.3.4. Calificación del impacto de los programas presupuestarios
UI data binding is a software design pattern that simplifies the development of user interface applications by binding user interface components to entities of the application domain. One advantage is that the entity model is separated from the actually applied user interface technology and thus reusability and maintainability are ensured. Never- theless, communication between the user interface and entity model must be possible; the user interface has to present the information of the bound data. Often the connection between the components is bidirectional which means that changes in the user interface also affect the entity model.
Actually, the GUI model supports a unidirectional connection to the entity model which means that the information presented by a control element is directly derived from the content of a bound entity. So-called adapters are responsible for the presentation based on the semantic representation of the intended output. They take the individual
Figure 6.14 – Overview of the concepts that are involved in the semantic data binding
information elements of an entity and use them to fill the features of a control element. Figure 6.14 gives an overview of the concepts involved in the binding process:
Every UIElement can contain the semantic content that is presented by the element which is an instance derived from the basic concept Entity. Additionally a UIElement can specify adapters that act as bridges between the UIElement and the contained se- mantic content. An ElementAdapter is responsible for describing the mapping between individual elements of the semantic content entities and the feature attributes of the con- nected UIElement. The individual elements are addressed with the help of a PPattern (see Section 4.4) and assigned to variables that are afterwards used in the specification of the adapter mappings. An AdapterMapping contains two attributes. The first is the target feature of the UIElement to which a value should be mapped. The second is a JEXL-expression that generates the new content of this feature based on the values of the variables previously assigned in the pattern. The evaluation of the mapping is processed during runtime and either triggered if a new GUI element with a binding to a semantic content is defined or if the bound content is updated.
In contrast to the other GUI languages mentioned in the introduction of this section, it is also possible to annotate control elements with the communicative intention of the user that may provoke him to interact with the element. For this, every UIElement can specify the supported interactions of the user with the element by the feature supportedEvents. Content of this feature is an instance of the concept SupportedEvent which describes the event type, a concept of the previously introduced event model, e.g., ClickEvent, ChangeEvent, MouseDownEvent. Additionally, the interpretation of this interaction can be specified by using an instance of the communicative function model (see Section 5.5). The implicitly given content of the communicative function can refer to the semantic content of the UIElement. This connection is declared by a GuiContentReference that is a subconcept of the ReferenceModel introduced in Section 5.5.1. The annotation with semantic information is used by the GUI input interpreter (see 7.8.2) for lifting the syntactic description of the interaction with a control element on a semantic level.
6.3 Modelling Graphical User Interfaces 143
6.3.3 Example
Figure 6.15 shows the example of a semantically annotated GUI model. The model instance describes a window that contains two GUI control elements and one semantic data entity. The semantic content (a) of the window is the movie instance Iron Man 3. The instance originally contains more data but for simplification purposes the figure only shows a list of cinemas where the movie is shown.
The control elements of the window are vertically aligned in a composite box (VBox). The first GUI element is a label (b) that displays the movie name. The content of the label is bound to the semantic content by an element adapter. The adapter defines a pattern describing the type of the semantic content that should be bound to the label and assigns the value of the name slot to the variable name. The adapter mapping describes how this content should fill the label’s features. In this example the name of the movie is used to fill the text feature of the label.
Figure 6.15 – A GUI model example for a window which presents a list of cinemas that show the movie Iron Man 3
Figure 6.16 – The GUI model example with resolved data bindings and the mockup of a possible rendering result
The second GUI element is a list (c) that presents the cinemas where the movie is running. The content of the list is again bound to the semantic content, in this case by an array adapter. The given pattern assigns the content of the movie’s cinema slot to the variable content. The array adapter behaves differently from a normal adapter because it creates one GUI element for each item in an array of entities. Thus, for every cinema where the movie is running, a list item is created with the name of the cinema as a label. This is defined by the ElementAdapter that is attached to the ListItem in the ArrayAdapter.
With the SupportedEvent we define which types of user interactions are supported by the list control element. In the example (d) this is a ChangeEvent that fires whenever the user selects a new item in the list. The model allows one to bind the semantic interpretation of the user’s intention to this event. Here the semantic entity of the cinema is introduced into the dialogue with the communicative function Inform. The semantic content of this communicative function is referenced to the content of the selected list item which is bound to the cinema entity it represents. This is defined by the GuiContentReference. The display context manager of the dialogue platform is responsible for resolving the data bindings and complements the GUI model with the necessary information that is retrieved from the bound semantic entities. The resulting GUI model from this process is depicted in Figure 6.16. Here the control elements are extended with the text that is displayed on the screen. It must be mentioned that for every cinema a ListItem has been generated that contains the corresponding cinema entity as semantic content.