Journal Articles

Migrating the communication protocol of client-server applications

Darbord, Gabriel and Verhaeghe, Benoît and Etien, Anne and Anquetil, Nicolas and Derras, Mustapha
IEEE Software
2023PDF
As part of a collaboration with Berger-Levrault, an international IT company, we are working on the migration of client-server applications. To escape legacy technologies and to evolve towards a “software as a service” model, the company decided to migrate the client side of its applications to Angular 14 and the server side to Spring Boot. In this paper, we focus on the migration of client-server communication from RMI and GWT-RPC to the REST architectural style. We identify issues associated with such a migration and propose a tool-based approach to address them. The migration involves (1) identifying existing services and exchanged data structures; (2) migrating the services; (3) migrating the data structures on the new client side; and (4) in some cases, reducing the amount of exchanged data to address performance issues. We experimented with our approach on four of the company’s applications currently using RMI or GWT-RPC.

GUI visual aspect migration: a framework agnostic solution

Verhaeghe, Benoît and Anquetil, Nicolas and Etien, Anne and Ducasse, Stéphane and Seriai, Abderrahmane and Derras, Mustapha
Automated Software Engineering
2021PDF
With the generalization of mobile devices and Web applications, GUI frameworks evolve at a fast pace: JavaFX replaced Swing, Angular 8 replaced Angular 1.4 which had replaced Google Web Toolkit (GWT). This situation forces organizations to migrate their applications to modern frameworks regularly so they do not become obsolete. There has been research in the past on automatic GUI migration. However, and concurrently, large organisations' applications use many different technologies. For example, the IT company with which we are working, Berger-Levrault, wishes to migrate applications written in generic programming language (Java/GWT), proprietary "4th generation" languages (VisualBasic 6, PowerBuilder), or markup languages (Silverlight). Furthermore, one must expect that in a few years time, new frameworks will appear and new migrations will be required. Thus, there is a need for a language-agnostic migration approach allowing one to migrate various legacy GUI to the latest technologies. None of the existing solutions allow to deal with such a variety of GUI framework. They also typically focus on a subpart of the migration (i.e. how to extract a specific GUI framework) ignoring the re-engineering/forward-engineering part of the migration (which is straightforward for a single technology). This makes it difficult to adapt these solutions to other GUI frameworks. We propose an approach to migrate the GUI part of applications. It is based on meta-models to represent the visual element structure and layout. We detail how to create both the GUI extractors and generators, with guidelines to support new markup and programming languages. We evaluate our approach by implementing three extractors and generators for web-based or desktop-based user interfaces defined with generic programming languages (Java, Pharo, TypeScript) or markup languages (XML, HTML). We comment case studies on five applications, opened and closed source, of different sizes. The implementations of our generic approach detect 99% of the widgets and identify (i.e. determine the type of the widget) 97% of them. We give examples of the migrated GUIs, both successful and not.

From GWT to angular: An experiment report on migrating a legacy web application

Verhaeghe, Benoît and Shatnawi, Anas and Seriai, Abderrahmane and Etien, Anne and Anquetil, Nicolas and Derras, Mustapha and Ducasse, Stephane
IEEE Software
2021PDF
Berger-Levrault is an international company that developed applications in GWT for more than 10 years. However, GWT is no longer actively maintained, with only one major update since 2015. To avoid being stuck with legacy technology, the company decided to migrate its applications to Angular. However, because of the size of the applications (more than 500 web pages per application), rewriting from scratch is not desirable. To ease the migration, we designed a semi-automated migration approach that helps developers migrate applications' front-end from GWT to Angular and a tool that performs the migration. In this paper, we present our approach and tool. We validated the approach on concrete application migration and compared its benefits to redeveloping the application manually. We report that the semi-automated migration offers an effort reduction over a manual migration. Finally, we present recommendations for future migration projects.

Conference Articles

Modest-pharo: Unit test generation for pharo based on traces and metamodels

Darbord, Gabriel and Vandewaeter, Fabio and Etien, Anne and Anquetil, Nicolas and Verhaeghe, Benoit
IWST 2024: International workshop on smalltalk technologies
2024PDF
Unit testing is essential in software development to ensure code functionality and prevent the introduction of bugs. However, challenges such as time constraints and insufficient resource allocation often impede comprehensive testing efforts, leaving software systems vulnerable to regression. To address this issue, we introduce Modest, a language-agnostic approach to unit test generation that uses metamodels and execution traces. This method ensures non-regression by replaying scenarios captured from real-world executions. We demonstrate the application of Modest to Pharo codebases by generating unit tests for two projects.

A unit test metamodel for test generation

Darbord, Gabriel and Etien, Anne and Anquetil, Nicolas and Verhaeghe, Benoit and Derras, Mustapha
International workshop on smalltalk technologies
2023PDF
Unit testing is a crucial aspect of software development, but developers often lack the time and resources to create comprehensive tests for their code. This can result in codebases that are vulnerable to bugs and issues. To address this problem, we present a unit test metamodel that enables the generation of unit tests. The metamodel provides a language-agnostic abstraction that enables automated transformation and code generation. We use the Famix family of models and tools from the Moose platform to build our metamodel and for code analysis. To generate realistic tests, we plan to use application traces consisting of method arguments and results. Our objective is to generate maintainable, human-readable tests that cover important use cases, including edge cases and rare scenarios. In this paper, we discuss related work in unit test generation, present the details of our metamodel, including its design, implementation and usage, and explore future work that will evaluate the effectiveness of our approach through case studies and experiments.

Analyzing dart language with pharo: Report and early results

Hlad, Nicolas and Verhaeghe, Benoit and Derras, Mustapha
International workshop on smalltalk technologies
2023PDF
Dart is a programming language introduced by Google in 2011. Today, it is mainly used in Flutter, a cross-platform SDK to build native mobile applications, desktop applications, and web-based applications. Since its introduction, Flutter has gained in popularity and so has Dart. Thus it has become crucial for the industry and the academic community to dispose of the proper tools to analyze, maintain and evolve projects in Dart. However, our research community has yet to propose tools for the static analysis of Dart. In this paper, we share our experience regarding the usage of Pharo 10 to support the analysis of Dart2.10 and we present our early work on a set of open-source tools. Our tools cover the parsing of Dart with SmaCC, the visualization of its AST with Roassal, and its meta-model analysis with Moose and Famix.

A hybrid architecture for the incremental migration of a web front-end

Benoît Verhaeghe. and Anas Shatnawi. and Abderrahmane Seriai. and Anne Etien. and Nicolas Anquetil. and Mustapha Derras. and Stéphane Ducasse.
Proceedings of the 17th international conference on software technologies - ICSOFT,
2022PDF
Nowadays, software migration is an effective solution to adopt new technologies while reusing the business value of existing applications. Among other challenges, the size and complexity of large applications are obstacles that increase the risks of migration projects. Moreover, the migration can imply a switch of programming languages. This is the case when migrating from Java to TypeScript. Thus, it is hard to migrate large and complex applications in one straightforward step. Incremental approaches have been designed to counter this problem. These approaches are based on hybrid architecture usages. However, none of the approaches use a hybrid architecture for GUI defined with different programming languages. In this paper, we propose a new hybrid architecture that enables the incremental migration of web applications. Our architecture is based onWeb Components that allow legacy technology artifacts to work with modern ones. We implement the architecture and use it in the case of migrating GWT applications to Angular. Then, we validate its usability in a real context by migrating an industrial web application.

Migrating GUI behavior: from GWT to angular

Verhaeghe, Benoît and Shatnawi, Anas and Seriai, Abderrahmane and Anquetil, Nicolas and Etien, Anne and Ducasse, Stéphane and Derras, Mustapha
International conference on software maintenance and evolution
2021PDF
In a collaboration with Berger-Levrault, a major IT company, we are working on the migration of GWT applications to Angular. We focus on the GUI aspect of this migration which requires a framework switch (GWT to Angular) and a programming language switch (Java to TypeScript). Previous work identified that the GUI can be split into the UI structure and the GUI behavioral code. GUI behavioral code is the code executed when the user interacts with the UI. Although the migration of UI structure has already been studied, the migration of the GUI behavioral code has not. To help developers during the migration of their applications, we propose a generic approach in four steps that uses a meta-model to represent the GUI behavioral code. This approach includes a separation of the GUI behavioral code into events (caller code) and the code executed when an event is fired (called code). We present the approach and its implementation for a real industrial case study. The application comprises 470 Java (GWT) classes representing 56 web pages. We give examples of the migrated code. We evaluate the quality of the generated code with standard tools (SonarQube, codelizer) and compare it to another Java to TypeScript converter. The results show that our code has 53% fewer warnings and rule violations for SonarQube, and 99% fewer for codelizer.

Challenges for layout validation: Lessons learned

Santiago Bragagnolo and Benoît Verhaeghe and Abderrahmane Seriai and Mustapha Derras and Anne Etien
International conference on the quality of information and communications technology, QUATIC'2020
2020PDF
Companies are migrating their software systems. The migration process contemplates many steps, UI migration is one of them. To validate the UI migration, most existing approaches rely on visual structure (DOM) comparison. However, in previous work, we experimented such validation and reported that it is not sufficient to ensure a result that is equivalent or even identical to the visual structure of the interface to be migrated. Indeed, two similar DOM may be rendered completely differently. So, we decide to focus on the layout migration validation. We propose a first visual comparison approach for migrated layout validation and experiment it on an industrial case. Hence, from this first experiment and already existing studies on image comparison field, we highlight challenges for layout comparison. For each challenge, we propose possible solutions, and we detail the three main features we need to create a good layout validation approach.

Modular Moose: A new generation of software reengineering platform

Nicolas Anquetil and Anne Etien and Houekpetodji, Mahugnon Honoré and Benoît Verhaeghe and Stéphane Ducasse and Clotilde Toullec and Fatija Djareddir and Jèrome Sudich and Mustapha Derras
International conference on software and systems reuse, ICSR2020
2020PDF
Advanced reverse engineering tools are required to cope with the complexity of software systems and the specific requirements of numerous different tasks (re-architecturing, migration, evolution). Consequently, reverse engineering tools should adapt to a wide range of situations. Yet, because they require a large infrastructure investment, being able to reuse these tools is key. Moose is a reverse engineering environment answering these requirements. While Moose started as a research project 20 years ago, it is also used in industrial projects, exposing itself to all these difficulties. In this paper we present ModMoose, the new version of Moose. ModMoose revolves around a new meta-model, modular and extensible; a new toolset of generic tools (query module, visualization engine, ...); and an open architecture supporting the synchronization and interaction of tools per task. With ModMoose, tool developers can develop specific meta-models by reusing existing elementary concepts, and dedicated reverse engineering tools that can interact with the existing ones

GUI migration using MDE from GWT to Angular 6: An industrial case

Verhaeghe, Benoît and Etien, Anne and Anquetil, Nicolas and Seriai, Abderrahmane and Deruelle, Laurent and Ducasse, Stéphane and Derras, Mustapha
2019 IEEE 26th international conference on software analysis, evolution and reengineering (SANER)
2019PDF
During the evolution of an application, it happens that developers must change the programming language. In the context of a collaboration with Berger-Levrault, a major IT company, we are working on the migration of a GWT application to Angular. We focus on the GUI aspect of this migration which, even if both frameworks are web Graphical User Interface (GUI) frameworks, is made difficult because they use different programming languages and different organization schema. Such migration is complicated by the fact that the new application must be able to mimic closely the visual aspect of the old one so that the users of the application are not disrupted. We propose an approach in four steps that uses a meta-model to represent the GUI at a high abstraction level. We evaluated this approach on an application comprising 470 Java (GWT) classes representing 56 pages. We are able to model all the web pages of the application and 93% of the widgets they contain, and we successfully migrated 26 out of 39 pages (66%). We give examples of the migrated pages, both successful and not.

Switching of GUI framework: the case from Spec to Spec 2

Dutriez, Clement and Verhaeghe, Benoît and Derras, Mustapha
Proceedings of the 14th edition of the international workshop on smalltalk technologies
2019PDF
Developers used frameworks to create their User Interface. Those frameworks are developed in a specific version of a language and can be used until the retro-compatibility is broken. In such case, developers need to migrate their software systems to a new GUI framework. We proposed a three-step approach to migrate the front-end of an application. This approach includes an importer, a GUI meta-model and an exporter. We validate our experiment on 6 projects in Pharo. We are able to migrate 5 out of 6 projects that all conserve their widgets organization.

Migration de GWT vers Angular 6 en utilisant l'IDM

Verhaeghe, Benoît and Etien, Anne and Ducasse, Stéphane and Seriai, Abderrahmane and Deruelle, Laurent and Derras, Mustapha
Conférence en Ingénierie du Logiciel
2019PDF

Migrating GWT to Angular 6 using MDE

Verhaeghe, Benoît and Anquetil, Nicolas and Ducasse, Stéphane and Seriai, Abderrahmane and Deruelle, Laurent and Derras, Mustapha
12th seminar on advanced techniques & tools for software evolution
2019PDF
In the context of a collaboration with Berger-Levrault, a major IT company, we are working on the migration of a GWT application to Angular. We focus on the GUI aspect of this migration which, even if both are web frameworks, is made difficult because they use different programming languages (Java for one, Typescript for the other) and different organization schemas (e.g. different XML files). Moreover, the new application must mimic closely the visual aspect of the old one so that the users of the application are not disturbed. We propose an approach in three steps that uses a meta-model to represent the GUI at a high abstraction level. We evaluated this approach on an application comprising 470 Java (GWT) classes representing 56 screens. We are able to model all the web pages of the application and 93% of the widgets they contain, and we successfully migrated (i.e., the result is visually equal to the original) 26 out of 39 pages (66%). We give examples of the migrated pages, both successful and not.

Empirical study of programming to an interface

Verhaeghe, Benoît and Fuhrman, Christopher and Guerrouj, Latifa and Anquetil, Nicolas and Ducasse, Stéphane
Proceedings of 34th conference on automated software engineering (ASE'19)
2019PDF
A popular recommendation to programmers in object-oriented software is to "program to an interface, not an implementation" (PTI). Expected benefits include increased simplicity from abstraction, decreased dependency on implementations, and higher flexibility. Yet, interfaces must be immutable, excessive class hierarchies can be a form of complexity, and "speculative generality" is a known code smell. To advance the empirical knowledge of PTI, we conducted an empirical investigation that involves 126 Java projects on GitHub, aiming to measuring the decreased dependency benefits (in terms of cochange).

Evaluating the efficiency of continuous testing during test-driven development

Demeyer, Serge and Verhaeghe, Benoît and Etien, Anne and Anquetil, Nicolas and Ducasse, Stéphane
Proceedings VST 2018 (2nd IEEE international workshop on validation, analysis and evolution of software tests)
2018PDF
Continuous testing is a novel feature within modern programming environments, where unit tests constantly run in the background providing early feedback about breaking changes. One of the more challenging aspects of such a continuous testing tool is choosing the heuristic which selects the tests to run based on the changes recently applied. To help tool builders select the most appropriate test selection heuristic, we assess their efficiency in a continuous testing context. We observe on two small but representative cases that a continuous testing tool generates significant reductions in number of tests that need to be executed. Nevertheless, these heuristics sometimes result in false negatives, thus in rare occasions discard pertinent tests.

Usage of tests in an open-source community

Verhaeghe, Benoît and Nicolas Anquetil and Stéphane Ducasse and Vincent Blondeau
Proceedings of the 12th edition of the international workshop on smalltalk technologies
2017PDF
During the development, it is known that tests ensure the good behavior of applications and improve their quality. We studied developers testing behavior inside the Pharo community in the purpose to improve it. In this paper, we take inspiration from a paper of the literature to enhance our comprehension of test habits in our open source community. We report results of a field study on how often the developers use tests in their daily practice, whether they make use of tests selection and why they do. Results are strengthened by interviews with developers involved in the study. The main findings are that developers run tests every modifications of their code they did; most of the time they practice test selection (instead of launching an entire test suite); however they are not accurate in their selection; they change their selection depending on the duration of the tests and; contrary to expectation, test selection is not influenced by the size of the test suite.

Ph.D. Thesis

Incremental approach for application GUI migration using metamodels

Verhaeghe, Benoît
2021PDF
Developers use GUI frameworks to design the graphical user interface of their applications. It allows them to reuse existing graphical components and build applications in a fast way. However, with the generalization of mobile devices and Web applications, GUI frameworks evolve at a fast pace: JavaFX replaced Java Swing, Angular 8 replaced Angular 1.4 which had replaced GWT (Google Web Toolkit). Moreover, former GUI frameworks are not supported anymore. This situation forces organizations to migrate their applications to modern frameworks regularly to avoid becoming obsolete. To ease the migration of applications, previous research designed automatic approaches dedicated to migration projects. Whereas they provide good results, they are hard to adapt to other contexts than their original one. For instance, at Berger-Levrault, our industrial partner, applications are written in generic programming languages (Java/GWT), proprietary “4th generation” languages (VisualBasic 6, PowerBuilder), or markup languages (Silverlight). Thus, there is a need for a language-agnostic migration approach allowing one to migrate various GUI frameworks to the latest technologies. Moreover, when performing automatic migration with these approaches, part of the migrated application still needs to be manually fixed. This problem is even more important for large applications where this last step can last months. Thus, companies need to migrate their application incrementally to ensure end-user continuous delivery throughout the process. In this thesis, we propose a new incremental migration approach. It aims at allowing the migration of large applications while ensuring end-user delivery. It consists of migrating pages using our automatic GUI migration tool, fixing them, and integrating them in a hybrid application. To create our GUI migration tool, we designed a pivot meta-model composed of several packages representing the visual and the behavioral aspects of any GUI. We detailed multiple implementations of our GUI migration tool that extract and generate GUI using different frameworks. We successfully applied our migration approach to a real industrial application at Berger-Levrault. The migrated application is now in production. We also validated our automatic GUI migration tool on several migration projects, including applications developed with programming and markup languages. The company is currently using our approach for other migration projects.