Easy code generator parses default programming language syntax with table, view and column definition data from a database as well as additional information saved inside the application and merges everything to complete program code.
To demonstrate how easy code generator works, let’s look at a simple method written in C# that fills a list box with data from a database. The complete method would look like this:
The above method was created by an easy code generator template that looks like this:
If we have a closer look at the template then we will recognize that parts of the original code are substituted with easy code generator syntax.
Without having to explain this syntax, we see that for instance the name of the method was merged from a static text “fill” and a user variable. The same user variable was used later on in the code to define the name of the control when assigning the value member, display member and the data source properties of the control.
The columns in the SELECT statement are being substituted by a special function named “columnsubstitution” and the table name in the FROM part of the SQL command is replaced by a system variable named “tableViewName”.
So easy code generator scrolls through the template text, recognizes its own syntax and substitutes it with the corresponding data. At the end it results in ready code.