FeatureLanguage: Automatic Generation of Application Backend for Model-Based Programming Course Projects
Erica De Petrillo, Gunter Mussbacher · 2024
University programs in software engineering or computer science increasingly include foundational courses in model-driven engineering. Building a substantial application through a term-long group project is one hands-on, practical way to learn the concepts taught in these courses. While learning by example can be very beneficial, providing students of these model-based programming courses with solutions in the form of complete working applications can be a real challenge due to time and resource constraints. In this paper, we argue that by specifying high-level requirements using our FeatureLanguage, we can completely generate the backend (i.e., Controller and Model) of a Model-View-Controller (MVC) application suitable for a university-level course. The proposed FeatureLanguage is an extension of a domain model with a specification of the different features the application should be able to accommodate as well as the constraints that need to be enforced. First, we discuss the FeatureLanguage, followed by an explanation of the different transformations from the FeatureLanguage to the backend code. We demonstrate that the complete backend can be generated and compare a generated MVC application with its handwritten counterpart. We argue that it is also feasible to completely generate a Controller test suite following a behaviour-driven development approach as well as the frontend of the MV C application, which we will explore in future work.