A Pattern-Based Development Approach for Interaction Flow Modeling Language
Total Page:16
File Type:pdf, Size:1020Kb
Hindawi Scientific Programming Volume 2019, Article ID 7904353, 15 pages https://doi.org/10.1155/2019/7904353 Research Article A Pattern-Based Development Approach for Interaction Flow Modeling Language Roberto Rodriguez-Echeverria ,1 Juan C. Preciado ,1 A´ lvaro Rubio-Largo ,2 Jose´ M. Conejero ,1 and A´ lvaro E. Prieto 1 1Quercus Software Engineering Group, University of Extremadura, Ca´ceres 10003, Spain 2Universidade Nova de Lisboa, 1099-085 Lisboa, Portugal Correspondence should be addressed to A´ lvaro Rubio-Largo; [email protected] Received 30 September 2018; Revised 24 January 2019; Accepted 17 March 2019; Published 14 April 2019 Academic Editor: Michele Risi Copyright © 2019 Roberto Rodriguez-Echeverria et al. -is is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited. Development and deployment technologies for data-intensive web applications have considerably evolved in the last years. Domain- specific frameworks or model-driven web engineering approaches are examples of these technologies. -ey have made possible to face implicit problems of these systems such as quick evolving business rules or severe time-to-market requirements. Both ap- proaches propose the automation of redundant development tasks as the key factor for their success. -e implementation of CRUD operations is a clear example of repetitive and recurrent task that may be automated. However, although web application frameworks have provided mechanisms to automate the implementation of CRUD operations, model-driven web engineering approaches have generally ignored them, so automation has not been properly faced yet. -is paper presents a pattern-based development approach for the Interaction Flow Modeling Language as a way to finally automate repetitive specification tasks. Our approach is illustrated by defining and applying IFML patterns for CRUD operations. Additionally, a supporting tool, which enables automation, is shown. -e suitability of our approach and the utility of its tool have been evaluated by its application into several real projects developed by a software company specialized in model-driven web application development. -e results obtained present evidence of a significant productivity improvement obtained by the automation of the IFML specification of CRUD operations. 1. Introduction allows the edition and validation of IFML models. But even more important, it also provides code generators to auto- Model-driven web engineering (MDWE) [1] approaches matically derive the final application code for a particular provide methodologies and tools for the design and de- technological platform, reducing the time-to-market and the velopment of most kinds of web applications. -ey address development effort for these web applications. different concerns by using separate models (navigation, Concerning the development effort, one of the most presentation, data, etc.) and are usually supported by model redundant tasks in data-intensive web application devel- compilers that automatically produce most of the applica- opment is the implementation of CRUD operations. As tion’s web pages and logic code. -e benefits of using Martin Fowler argued, “disappointing as it is, many of the MDWE are clear from different points of view such as team use cases in an enterprise application are fairly boring productivity, software quality, or adaptation to ever evolving “CRUD” (create, read, update, delete) use cases on domain technologies [2, 3]. objects” [7]. Among the different MDWE approaches, it is worth However, and surprisingly, while several develop- mentioning IFML (Interaction Flow Modeling Language) ment frameworks such as Ruby on Rails [8], Django [9], [4], an OMG standard for the development of data-intensive MonoRail [10], or Catalyst [11], just to cite a few, have applications that has become a reference in industrial de- adopted solutions to optimize the implementation of CRUD velopments [5, 6]. Its main development tool, WebRatio, operations, no MDWE approach (i.e., IFML/WebRatio) has 2 Scientific Programming proposed an automatic approach to perform these tasks yet, MDWE approach highly improved maintainability com- even though there are works claiming a significant pro- pared to a code-centric implementation process; for ex- ductivity gain (more than 90%) when these tasks are au- ample, OOH4RIA improved the actual efficiency of the tomated by model-driven techniques [12, 13]. changeability tasks 317 times and also improved its effec- -is paper presents a pattern-based development ap- tiveness by up to 27%. Nevertheless, although all these works proach for the Interaction Flow Modeling Language. A reveal a clear optimization of the development effort, they do collection of IFML patterns specifying a possible repre- not specifically address CRUD operations, which is the main sentation of CRUD operations are proposed. Moreover, a objective of other works such as [12, 13]. WebRatio plug-in, developed for the automatic instantiation In [12], the authors presented a model transformation of IFML patterns, is presented as a supporting tool. Fur- approach that automatically generates the code imple- thermore, an industrial case study is presented to validate menting the CRUD operations for a web system taking as our approach and to assess the utility of the supporting tool input class diagrams based on a specific UML profile. In [16], developed. For such validation, we have relied on the col- the authors also evaluated the productivity improvements laboration with an industrial partner specialized in the obtained by a model-driven approach that automatically professional development of data-intensive web applications generates the CRUD operations source code for a web in- using WebRatio. formation system. -is approach also takes as input the -is work provides a relevant extension of previous UML class diagrams for the system. By using the approach, publications [14, 15]. -is work has been conceived from a the authors observed an important development of time methodological point of view by concentrating on the in- reduction (up to 90.98%). -ey also surveyed developers troduction of a pattern-based development approach for about the difficulties found compared to the manual coding IFML. Furthermore, we present the definition and instanti- approach and obtained better results for the model-driven ation of IFML patterns for CRUD operations. Conversely, one. However, in [12, 13], the proposed approaches, first, previous works were mainly focused on the supporting tool lack of a particular language to specify the navigational development and description. In [14], we focused on pre- concern of web applications and, second, cannot be easily senting a first version of the tool and assessing its utility. applied in professional environments using MDWE tools, as While in [15], a new version of the tool was published (code WebRatio. available), featuring pattern customization, a renovated user Finally, the automatic generation of CRUD operations interface, and pattern-level editing operations. has been the focus of different works at different levels of -e rest of the paper is organized as follows: Section 2 abstraction: at code level (e.g., grocery CRUD for PHP [22]) presents the motivation and the related work, highlighting or at framework level (Ruby on Rails [8], Django [9], both studies about optimization in MDWE and proposals MonoRail [10], or Catalyst [11]). -ese frameworks provide for automatic generation of CRUD operations. Section 3 specific tools to automate the implementation of CRUD provides a brief introduction to IFML. A web application is operations, like software scaffolding toolkits, which allow presented in Section 4 as an illustrative example. Section 5 generating the structural parts of the applications expressed presents the core concepts of our approach: pattern defi- in some simplistic specification language (normally XML or nition and instantiation. -e tool for automating pattern YAML). Once the code is generated, it has to be manually application is exposed in Section 6. Section 7 presents the refined by developers, discarding the initial specifications. main results obtained after applying the approach in an As main limitation, such approaches force a specific tech- industrial case study for validation. Finally, Section 8 nological platform and architecture. -ey posses the ad- summarizes the main contributions of this work and gives vantages of automatic code generation to speed-up the initial an overview of the future research lines. stages of the development. However, these proposals are defined at a lower level of abstraction than model-driven 2. Motivation and Related Works approaches. Hence they cannot leverage on MD main benefits, such as the independence of specific platforms and, -e optimization of development effort in the domain of in general, the optimization of development efforts outlined web engineering has been addressed by several previous at the beginning of this section. works. In [16], an assessment of the variation in productivity To the best of our knowledge, and although the ad- due to the use of a MDWE approach instead of a code- vantages seem considerable, no MDWE approach has centric development process was introduced. -ey observed addressed those issues by effectively automating redundant an important productivity gain by using their model-driven and repetitive development tasks. -is is the rationale for