PHP re-factoring: HTML templates Name of candidate: Dimitrios Kyritsis E-mail:
[email protected] Date: September 2013 Host organization: Centrum Wiskunde & Informatica (CWI) URL: http://www.cwi.nl/ Address: Science Park 123, 1098 XG Amsterdam Contact persons: Mark Hills -
[email protected] Jurgen J. Vinju -
[email protected] 1 Abstract For every software developer the goal, when he creates software, is that the final result of his efforts meets its initial requirements. The software should operate as it was meant to, without any or at least without significant inconveniences. However, experienced developers have another goal, to write simple code. Their experience has taught them that the simpler the code is, the easier will be its maintenance. For web application developers the situation is the same. A way for them to write simpler web applications with easily maintainable code is to use template systems. Thereby, they can separate business logic from its presentation making their lives way easier, especially if they have to collaborate with web designers. Developers and designers will then have different fields of concern and the changes that they make will not affect each other's work. This thesis will describe our efforts to create an application which can automatically transform normal code into uses of template systems. In the beginning we will enumerate the factors that were taken into account for the creation of this application, along with a rationale for them. Subsequently, we will describe the steps and the decisions that were taken during the creation of our application. Finally, there will be a validation phase which will show if our application can really offer the advantages that was created for.