Development via Code Generators

Jan Burse, created May 02. 2009 The development of the sales system is in full operation. This gives us an opportunity to take a short break and to examine how the procedure for web development differs from the procedure for simple applications. What immediately draws attention is the fact that for web development one does not have the control over every component. This phenomenon shows up most clearly with the client, but is also present somehow for the server, when for example web hosting is done by third parties. We accommodate the variety in the range of clients in that we simultaneously develop and test for multiple target systems. The different target systems are connected by a version management system. Among the clients we find different platforms, different browsers and different mailers. Because we only make use of HTML and CSS, and as well of as little as possible JavaScript, the problems do not get out of hands, but nevertheless we have to ay attention on the different look & feels. Finally the idiosyncrasies of the popular browsers and mailers have to be fought. We even proceed in that we execute the server on the different platforms, which even run different database management systems. The reason is on one hand to reach flexibility in web hosting. On the other hand we can develop and test quicker, as we do not have to wait for a central build or a dedicated deployment. This possibility is not only given to us by the standardization and distribution possibilities of Java. A further contribution stems from the database access via Matula. By means of the cursor-objects a number of servers can be connected to a number of database management systems. Until now we were only talking about the additional effort incurred by web development. But we can also find advantages in web development, which will accelerate the development and testing. In particular we would like to mention the automatic generation of program code. We apply this technique already for the generation of the Java cursor-objects. The point of departure for this is the database schema enhanced by annotations. The generator is in itself a web application and uses JSP based code templates. The generator is also capable of generating lists, displays and trees. The code templates are now generating JSP pages which will make use of the cursor-objects. The results are mini-applications in the „Ultra-Thin” client style. For the current development of the sales system the share is not insignificant. Thus 31% of the functionality of the sales system is based on generated mini-applications, which are mainly used for internal administration functions. External user interfaces, since they cannot be build on the generic sequences and layouts of the mini-applications, are less suited.