Generating Java EE 6 Application Layers and Components in JBoss Environment Gábor Antal, Ádám Zoltán Végh, Vilmos Bilicki Department of Software Engineering University of Szeged Szeged, Hungary {antalg, azvegh, bilickiv}@inf.u-szeged.hu AbstractNowadays, prototype-based development models are very important in software development projects, because of the tight deadlines and the need for fast development. Prototypes can be very efficient in the analysis, validation and clarification of the requirements during the development iterations. Model-driven development and code generation are frequently used techniques to support the fast development of application prototypes. There are many recurring tasks in the iterations of a prototype development process, which can be performed much faster using high level models and the automatic generation of application component implementations. The goal of this paper is to review model- driven development and code generation methods and tools, which can be used to create Java Enterprise Edition 6 applications. Besides, this paper introduces a new code generation tool, which uses the JBoss Forge framework for generating application layers and components based on the entities of the application. Keywords- prototype development; model-driven engineering; code generation. I. INTRODUCTION There are many software development projects at present where it is very hard to collect all the requirements at the beginning of the project. The customers can be uncertain or they cannot visualize the requirements in detail and precisely. Therefore, the classical waterfall development model does not work in these projects. The requirements specification and the system plan need more phases to validate and clarify, which need active communication with the customer. Therefore, prototype-based development models can be useful in these cases [1]. Using these models it is possible to show a functional application prototype to the customer to validate and clarify the requirements. But very fast prototype implementation is needed for effective prototype-based development processes. For this purpose, model-driven development and code generation methods are used to speed up the implementation. However, it is important to examine and use software design patterns to ensure the maintainability of the application. The goal of Model-Driven Development (MDD) [2] is to simplify the system design process and increase development productivity by reusing standard software models and design patterns. The developer defines the components of the system with their relations, the structures and relations of the data to be managed, and the use cases and behaviors of the system using high level models. Based on these high level representations the model-driven development tools can automatically produce lower level system models, and in the end of the process they can generate implementations in specific programming language. Transitions between the different model levels and the generation of the implementation from the models are performed by predefined automatic transformations. The model-driven development process supports the regeneration of the implementation after modifying the system models. A very important tool of model-driven development is code generation, which is used in the implementation phase [3]. The goal of code generation is to automatically create a runnable implementation of the system in a specific programming language based on the initial high level system models. Using this technique the production of prototypes can be accelerated significantly. The usage of different design patterns can cause a lot of recurring manual implementation tasks, which can be supported with code generation effectively. The generated source code is supported by expert knowledge, so the maintainability of the code can be higher compared to the manual implementation. However, the existing code generation solutions have some main disadvantages and deficiencies, which make them unable to use effectively for generating Java EE 6 [4] applications. Our goal is to introduce a new code generation toolkit, which eliminates these drawbacks and generates application prototypes based on Java EE design patterns. This paper provides insights on some methods, which can be used for effective development of Java EE (Enterprise Edition) 6 application prototypes. Section II examines some related work in the area of code generation and shows the disadvantages of the existing generator toolkits. Section III presents the JBoss Forge [5] framework, which can generate Java EE 6 application prototypes with its Forge Scaffold [6] extension. Section IV describes some practical methodologies for code generation using some tools from the JBoss Forge framework. Section V introduces a Forge-based code generation toolkit, which eliminates the defects of the Forge Scaffold and provides more application components to generate. Section VI presents a case study about the usage of our generator toolkit in a telemedicine project. Section VII concludes the paper and discusses some interesting problems that are targeted to be further studied and improved in the future. 44 Copyright (c) IARIA, 2014. ISBN: 978-1-61208-343-8 PATTERNS 2014 : The Sixth International Conferences on Pervasive Patterns and Applications