CodeCrafter – Efficient Code Generator for Modern Single-page Web Applications
DOI:
https://doi.org/10.7251/IJEEC2501001VKeywords:
code generation, single-page web applications, REST API, relational databaseAbstract
Web applications and REST API based applications can be seen as a most common type of application today and their number is constantly increasing. Due to the pressure to produce more code and be faster at producing it, developers have been using various programming languages, libraries and frameworks suitable for such applications. Two of the most popular technologies are Spring on the back-end, and React on the front-end. While each technology provides a satisfiable functionality, the amount of code that needs to be produced is non-trivial, especially in cases where the application has to provide even basic security and auditing functionalities. One solution for this issue is use of code generator tools that produce both back- and front-end code from a model. While a wide variety of generators exist, none of the analyzed ones fulfill all the requirements of a modern web application. In this paper, we present CodeCrafter, a web-based code generation application that produces Spring and React code based on relational data model in DDL or JSON format, and provides developers with simple and efficient tool to generate fully functional foundational code. We compare it to existing code generation tools and measure its performance as a function of number of tables in the database. We show that CodeCrafter produces code in very short amount of time even for very complex databases, while providing features and functionalities not present in other analyzed tools. We also give a short overview of possible use in conjunction with LLM based coding tools.