# Developing Web-Based Process Management with Automatic Code Generation
## 3 Architecture
### Automatic Code Generation to Create a Task  
In order to implement this process effectively and efficiently, components such as stored procedure patterns, JS functions for plug-ins, HTML patterns, JSON schema, and the T4 Template library must be readily available. In addition, these components include libraries, templates, plug-ins, and other HTML view patterns. These components are open-source code written in a standardized way that conforms to standard form elements. The functionality of the patterns encompasses components such as Plugin JS, HTML templates, stored procedures, and JSON schema. Plugin JS allows users to interact with JavaScript code that manages certain web features. HTML templates define the visual presentation of web page elements. JSON schema is a data structure that determines how data are stored and processed. These components can make the software development process faster and easier. They are also customizable and can be adjusted by developers to suit the project's specifics. HTML plugins and plugins are available, including ready-made JavaScript functions for each HTML element. Some examples of plugins are given in Table 1.  
Figure 3 shows the database schema used for automatic code generation. This database structure defines the main tables of Module, Plugin, Element, Function, Action, and Entity. Establishing relationships between these main tables is undertaken by tables defined with the suffix \"Map\", for example, PluginFunctionMap and FunctionElementMap. However, tables with the word \"type\" in their name represent properties or values associated with the respective parent tables. In database management systems, the automatic generation of CRUD (Create, Read, Update, Delete) operations that carry out essential data operations provides efficiency gains in software development. Using ready-made stored procedure \begin{table}
\begin{tabular}{c c c} \hline \hline
**Element** & **JavaScript Plugin** & **HTML Plugin** \\ \hline Element & JavaScript Plugin & HTML Plugin \\ Button & button.js & button.html \\ DatePicker & datepicker.js & datepicker.html \\ Form & from.js & form.html \\ Image Viewer & image\_viewer.js & image\_viewer.html \\ Selectbox & selectbox.js & selectbox.html \\ Input & input.js & input.html \\ \hline \hline \end{tabular}
\end{table} 
Table 1: HTML and JavaScript pattern templates. Figure 2: Stages of automatic code generation for system architectures. templates facilitates these automatic code-generation processes in this context. Ready-stored procedure templates are given in Figure 4.  
When the automatic code generation infrastructure is prepared, the first step is to add database tables for code generation. The table shown in Figure 5 has \"Column Name, Data Type, and Allow Empty Values\" columns. For example, in the \"Leave\" table, leave start date, leave end date, and description parameters are defined under \"Column Name\". The relevant data types for these parameters are specified in the \"Data Type\" column. The \"Allow Empty Values\" column indicates whether specific fields are mandatory. Figure 3: Database class diagram. In the second stage, the automatic code generation process starts when the developer creates a data table. Based on the table name, the program automatically executes standard stored procedures. In this process, the development efficiency is increased by using predefined stored procedures. The pseudo-code below defines a connection string based on a specified service name, initializes database connections, and classifies tables according to specific criteria. This code generates SQL procedures for CRUD (Create, Read, Update, Delete) operations and specific procedures for specific tables. These procedures are automatically stored or updated in the database. In the framework of this work, a stored procedure pattern specific to the Create operation is presented in Algorithm 1. This function creates a stored procedure that performs a Create operation for a given table in the database.