[Back]


Diploma and Master Theses (authored and supervised):

M. Rieder:
"From Legacy Web Applications To Webml Models";
Supervisor: G. Kappel; Business Informatics Group, 2009; final examination: 2009-12-01.



English abstract:
In the last decade the adoption of web applications instead of desktop applications has grown rapidly. Also the patterns and technologies for developing and running web applications have changed a lot over time. The World Wide Web has evolved from a collection of linked static documents to a space of countless dynamic, data centric applications. One of the oldest and most popular languages for developing dynamic web applications is PHP. Although nowadays there are proved techniques for developing web applications in PHP, many older PHP web applications are written without the notion of applying well-defined design patterns. Those web applications are hard to understand, maintain, extend as well as hard to migrate to new web platforms.
Nowadays many web applications are developed using Model Driven Engineering (MDE) techniques where software systems are described as models and code artifacts are generated out of these models. But often the requirement is not to develop a completely new web application but to capture the functionality of an existing legacy application. As it usually takes a lot of time for humans to understand the source code, it can be helpful to have a tool that analyzes the source artifacts and transforms them into a model on a higher level of abstraction. This process is called reverse engineering. The requirements for such a tool to work is the existence of well-known patterns in the source code, which is typically found in Model-View-Controller (MVC) web applications.
In this thesis a reverse engineering process from a legacy PHP web shop application into a model of the Web Modeling Language (WebML), based on static code analysis, is presented. First of all the requirements for the source code are analyzed in order to apply an automatic reverse engineering process on it. The source application is refactored to fulfill these requirements, which leads to a MVC version of the example application. The refactored application is the source for the next step, a code to model transformation into an intermediate model of the MVC web application. The last step is a model to model transformation from the the MVC model into a WebML model.
The result is aWebML model that shows the most important structural and behavioral aspects of the example application. The benefit of such a model is that that it provides a realistic documentation of the current state of the application. Whenever the application changes, the process can be repeated so the documentation never gets outdated. It helps humans to understand the connections between
different parts of the application and can be used to support refactoring activities or the migration to another platform.

German abstract:
In den letzten Jahren ist der Einsatz von Webanwendungen als Ersatz für Desktop Anwendungen rapide angestiegen. Auch die Entwurfsmuster und die Technologien, die zur Entwicklung und zum Betrieb von Webanwendungen verwendet werden, haben sich im Laufe der Zeit geändert. Das World Wide Web hat sich von einer Sammlung aus statischen, verlinkten Dokumenten zu einem Netz aus unzähligen dynamischen Applikationen für unterschiedlichste Zwecke entwickelt. Eine der ältesten und auch beliebtesten Sprachen zur Entwicklung von Webanwendungen ist PHP. Obwohl es heutzutage erprobte Techniken zur Entwicklung von PHP Anwendungen gibt, wurden viele ältere PHP Anwendungen ohne dem Einsatz von Entwurfsmustern geschrieben. Solche Webanwendungen sind schwierig zu verstehen, zu warten, zu erweitern und umzuschreiben.
Heutzutage werden viele Web Anwendungen unter Einsatz von Techniken des Model Driven Engineerings (MDE) entwickelt, wo Software Systeme als Modelle beschrieben werden und Code Artefakte aus diesen Modelle generiert werden. Doch häufig ist es nicht gefordert, eine komplett
neue Web Anwendung zu entwickeln, sondern die Funktionalität einer existierenden Legacy Applikation zu erfassen. Da ein Mensch üblicherweise lange braucht, um den Quellcode zu verstehen, kann ein Tool hilfreich sein, das den Quellcode analysiert und in ein Model auf einer höheren Abstraktionsebene transformiert. Diesen Vorgang nennt man Reverse Engineering. Dafür müssen wohldefinierte Muster im Quellcode vorhanden sein, wie man sie typischerweise in Model-View-
Controller (MVC) Web Anwendungen findet.
In dieser Arbeit wird ein Reverse Engineering Prozess von einer Legacy PHP Webshop Anwendung in ein Model der Web Modeling Language (WebML), basierend auf statischer Codeanalyse, vorgestellt. Zuerst werden die Anforderungen analysiert, die der Quellcode erfüllen muss, um überhaupt einen automatischen Transformationsprozess darauf anwenden zu können. Die Beispielapplikation wird einem Refactoring unterzogen, das zu einer MVCWebanwendung führt. Der nächste Schritt ist eine Model to Code Transformation in eine Zwischenmodell der MVCWeb Anwendung. Der letzte Schritt ist eine Model to Model Transformation des MVC Modells in einWebML Modell.
Das Ergebnis ist ein WebML Modell, das die wichtigsten Aspekte der Struktur und des Verhaltens der Beispielanwendung darstellt. Der Nutzen so eines Modells ist, dass es eine realistische Dokumentation über den aktuellen Zustand der Applikation darstellt. Sobald sich die Applikation ändert, kann der Prozess wiederholt werden, so dass die Dokumentation niemals veraltet. Das Modell hilft Menschen, die Zusammenhänge der verschiedenen Anwendungsteile zu verstehen und kann
für Refactoringzwecke oder für die Migration auf eine neue Plattform verwendet werden.


Electronic version of the publication:
http://publik.tuwien.ac.at/files/PubDat_184509.pdf


Created from the Publication Database of the Vienna University of Technology.