Meet Zontroy Code Generator , the savior angel of large-scale software that greatly reduces software development costs 👼:

Tolgahan İpek
CodeX
Published in
8 min readJun 13, 2024

Hello Everyone 🖐, today I will try to explain to you in a conversational manner a general article about how Zontroy code generator software can reduce software costs. I hope it will be useful for you. 🙏

TOPICS:

WHAT IS ZONTROY CODE GENERATOR?

ADVANTAGES

INSTALLATION

MAKING A DATABASE CONNECTION

ZONTROY COMMANDS

CODE SYNTAX STRUCTURE

CREATING THE CODE WITH ZONTROY

WHAT IS ZONTROY CODE GENERATOR?

To give a general definition, Zontroy Code Generator is a software that has its own syntax structure and compiler structure, can work in tandem with any database provider, and has the mission of reducing coding costs. It has many popular features such as Python, Java, JavaScript, C++ and Ruby. It is perfect for supporting programming languages.

Supported programming languages

ADVANTAGES:

a. Time Savings :

Zontroy eliminates the need to write repetitive code segments, allowing developers to focus on more critical and creative aspects of software development. This results in significant time savings during the coding process.

b. Reduced Errors:

Manually writing repetitive code segments can introduce errors and inconsistencies. Zontroy generates code consistently and accurately, reducing the likelihood of bugs and simplifying debugging.

c. Code Standardization:

Maintaining a consistent coding style across a project or team can be challenging. Zontroy enforces coding standards and conventions, ensuring that code remains uniform and easily maintainable.

d. Improved Productivity:

With Zontroy, programmers can increase their productivity by automating routine tasks, such as creating data access layers or generating API endpoints. This allows them to develop features and functionality more rapidly.

e. Learning Curve:

Zontroy’s user-friendly interface and templates make it accessible to developers with varying levels of experience. Novice programmers can quickly start using code generation to enhance their productivity, while experts can customize templates to meet specific project requirements.

Advantages

INSTALLATION:

To download the Zontroy Code Generator software to your computer, you can go to https://zontroy.com/download and select the installation option suitable for your operating system and install it on your computer with peace of mind. Moreover, the integrated development kit (ide) installation option is also available on the site.

Download

MAKING A DATABASE CONNECTION:

After the Zontroy Code Generator Ide installation process is completed, we will see 3 options in the Action assistant section.

1-Create a Blank Project:

Option 1

2-Create Project From a Template:

Option 2

3-Open Project From a Template:

Option 3

Then, by clicking on the first option, we need to make a configuration setting regarding which database provider the code generator will work with. Zontroy offers the opportunity to work with 5 databases in total. After entering information such as data source, server, database name, username and password specific to the relevant database, Zontroy connects with the selected database.

Configuration

After the configuration setting was made, we finally completed connecting the database and included the tables in the database as entities into the code generator software. Thus, by associating the sections that are susceptible to code repetition with the names of the tables we pull from this database, 100s or even 1000s of lines of code that are susceptible to code repetition are minimized to a large extent, allowing the code cost to be reduced by 50 percent.

Configuration successful

ZONTROY COMMANDS:

create — empty:

Creating a project is a starting point to generate code in Zontroy. You can do it using create command. If you are creating a project to generate code using a database connection then use this command.

zontroy --create
--empty
--type=VALUE
--language=VALUE
--name=VALUE
--server=VALUE
--database=VALUE
--user=VALUE
--password=VALUE
--path=VALUE

— empty

Creates an empty project.

— type

MSSQL|MySQL|Oracle|PostgreSQL

— language

CSharp|Go|Java|Javascript|PHP|Python|R|Swift|TypeScript|VB.Net|Other|Another

— name

Name of the Zontroy Project

— server

Server name of the database.

— database

Name of the database to connect.

— user

Database user.

— password

Database user password.

— path

Path of the Zontroy Project

create — template — type=Entity

Creating a template project provides a project example to generate code Zontroy. If you are creating a template project based on a template using entity classes then use this command.

zontroy --create
--template
--type=Entity
--language=VALUE
--name=VALUE
--template-name=VALUE
--entity-path=VALUE
--path=VALUE

generate

Use generate command to generate code from all template files in the current project.

zontroy --generate --all [--watchgeneration=VALUE]

— all

It means that generate code from all zsif, zref and ziref files in the current project directory.

— watchgeneration

This is an optional parameter and displays generated code in output window in that speed.

1x|2x|4x|8x|16x|32x|64x|128x|256x|512x

For more commands you can visit https://docs.zontroy.com/ .

CODE SYNTAX STRUCTURE:

zg Prefix

In Zontroy language keywords starts with zg prefix. It allows Zontroy to distinguish code written in Java, Python, Go etc. and Zontroy Language.

For example, zg-entity is a predefined object of an entity corresponding to a table in database. Another example is zg-for that can execute a block of code a number of times.

Triple Brackets

Brackets have to be written triple times in Zontroy. It is because while implementing a code file Zontroy code is written into the code of another programming language. It helps Zontroy to distinguish code written in Java, Python, Go etc. and Zontroy Language.

Parentheses ((( ))): Used to group expressions.

Curly braces {{{ }}}: Used to group statements together. They are used to define a code block and are used in control statements (if, for, etc) and classes, methods and other constructs.

Square brackets [[[ ]]]: Used to operate on pre-defined objects.

Triple Operators

Operators and marks have to be written triple times or more in Zontroy. It is because while implementing a code file Zontroy code is written into the code of another programming language.

When we implement a for loop we will write triple left parantheses, triple right parantheses, triple left braces and triple right braces.

Equality =====: Used to compare right side and left side expression. It is used as five equal signs.

For more commands you can visit https://docs.zontroy.com/zontroy-tutorial/zontroy-syntax.

CREATING THE CODE WITH ZONTROY:

Zontroy has 3 file types to generate code.

zsif:

Zontroy Single File is used to generate lines of code inside a single file. It uses .zsif extension.

[file_name].[file_extension].zsif

zref:

Zontroy Repeating File is used to create multiple code files and generate lines of code inside those. It uses .zref extension. Name of zref file is set programatically by entering a name in Zontroy Programming Language.

[file_name].[file_extension].zref

ziref:

Zontroy Inner Repeating File is used to create folders, multiple code files and generate lines of code inside those. It uses .ziref extension. Name of folders and ziref files is set programatically by entering a name in Zontroy Programming Language.

[file_name].[file_extension].ziref

A Sample Project:

RESULT:

Input:

using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Oprazi.Bll.Services.IServices;
using Oprazi.Dto.DTOs.zg-singularize(((zg-entity...zg-name)));
using Oprazi.Utility.Utilities;
using System;
using System.Threading.Tasks;

namespace Oprazi.Api.Controllers
{
[Route("api/[controller]")]
[ApiController]
public class zg-singularize(((zg-entity...zg-name)))Controller : ControllerBase
{
private readonly Izg-singularize(((zg-entity...zg-name)))Service _zg-lower(((zg-singularize(((zg-entity...zg-name))))))Service;

public zg-singularize(((zg-entity...zg-name)))Controller(Izg-singularize(((zg-entity...zg-name)))Service zg-lower(((zg-singularize(((zg-entity...zg-name))))))Service)
{
_zg-lower(((zg-singularize(((zg-entity...zg-name))))))Service = zg-lower(((zg-singularize(((zg-entity...zg-name))))))Service;
}

[Authorize(Policy = ClaimUtility.zg-lower(((zg-singularize(((zg-entity...zg-name)))))))]
[HttpGet("getzg-lower(((zg-pluralize(((zg-entity...zg-name))))))")]
public async Task<IActionResult> Getzg-pluralize(((zg-entity...zg-name)))([FromQuery] zg-singularize(((zg-entity...zg-name)))ToFilterDTO filter)
{
var zg-lower(((zg-entity...zg-name))) = await _zg-lower(((zg-singularize(((zg-entity...zg-name))))))Service.Getzg-pluralize(((zg-entity...zg-name)))(filter);
if (zg-lower(((zg-entity...zg-name))) == null)
return NotFound();
else
return Ok(zg-lower(((zg-entity...zg-name))));

}

[Authorize(Policy = ClaimUtility.zg-lower(((zg-singularize(((zg-entity...zg-name))))))_view)]
[HttpGet("getzg-lower(((zg-singularize(((zg-entity...zg-name))))))/{id}")]
public async Task<IActionResult> Getzg-singularize(((zg-entity...zg-name)))(int Id)
{
var zg-lower(((zg-singularize(((zg-entity...zg-name)))))) = await _zg-lower(((zg-singularize(((zg-entity...zg-name))))))Service.Getzg-singularize(((zg-entity...zg-name)))ById(Id);
if (zg-lower(((zg-singularize(((zg-entity...zg-name)))))) == null)
{
return NotFound();
}

return Ok(new { data = zg-lower(((zg-singularize(((zg-entity...zg-name))))))});

}

[Authorize(Policy = ClaimUtility.zg-lower(((zg-singularize(((zg-entity...zg-name))))))_create)]
[HttpPost("addzg-lower(((zg-singularize(((zg-entity...zg-name))))))")]
public async Task<IActionResult> Addzg-singularize(((zg-entity...zg-name)))(zg-singularize(((zg-entity...zg-name)))ToAddDTO model)
{
await _zg-lower(((zg-singularize(((zg-entity...zg-name))))))Service.Addzg-singularize(((zg-entity...zg-name)))(model);

return Ok();
}

[Authorize(Policy = ClaimUtility.zg-lower(((zg-singularize(((zg-entity...zg-name))))))_update)]
[HttpPut("updatezg-lower(((zg-singularize(((zg-entity...zg-name))))))/{id}")]
public async Task<IActionResult> Updatezg-singularize(((zg-entity...zg-name)))([FromBody] zg-singularize(((zg-entity...zg-name)))DTO model)
{
await _zg-lower(((zg-singularize(((zg-entity...zg-name))))))Service.Updatezg-singularize(((zg-entity...zg-name)))(model);

return Ok();
}

[Authorize(Policy = ClaimUtility.zg-lower(((zg-singularize(((zg-entity...zg-name))))))_delete)]
[HttpDelete("deletezg-lower(((zg-singularize(((zg-entity...zg-name))))))/{id}")]
public async Task<IActionResult> Deletezg-singularize(((zg-entity...zg-name)))(int Id)
{
await _zg-lower(((zg-singularize(((zg-entity...zg-name))))))Service.Deletezg-singularize(((zg-entity...zg-name)))(Id);
return Ok();
}
}
}

Output-City:

namespace Oprazi.Api.Controllers
{
[Route("api/[controller]")]
[ApiController]
public class cityController : ControllerBase
{
private readonly IcityService _cityService;

public cityController(IcityService cityService)
{
_cityService = cityService;
}

[Authorize(Policy = ClaimUtility.city)]
[HttpGet("getcities")]
public async Task<IActionResult> Getcities([FromQuery] cityToFilterDTO filter)
{
var city = await _cityService.Getcities(filter);
if (city == null)
return NotFound();
else
return Ok(city);

}

[Authorize(Policy = ClaimUtility.city_view)]
[HttpGet("getcity/{id}")]
public async Task<IActionResult> Getcity(int Id)
{
var city = await _cityService.GetcityById(Id);
if (city == null)
{
return NotFound();
}

return Ok(new { data = city});

}

[Authorize(Policy = ClaimUtility.city_create)]
[HttpPost("addcity")]
public async Task<IActionResult> Addcity(cityToAddDTO model)
{
await _cityService.Addcity(model);

return Ok();
}

[Authorize(Policy = ClaimUtility.city_update)]
[HttpPut("updatecity/{id}")]
public async Task<IActionResult> Updatecity([FromBody] cityDTO model)
{
await _cityService.Updatecity(model);

return Ok();
}

[Authorize(Policy = ClaimUtility.city_delete)]
[HttpDelete("deletecity/{id}")]
public async Task<IActionResult> Deletecity(int Id)
{
await _cityService.Deletecity(Id);
return Ok();
}
}
}

Output-Country:

namespace Oprazi.Api.Controllers
{
[Route("api/[controller]")]
[ApiController]
public class countryController : ControllerBase
{
private readonly IcountryService _countryService;

public countryController(IcountryService countryService)
{
_countryService = countryService;
}

[Authorize(Policy = ClaimUtility.country)]
[HttpGet("getcountries")]
public async Task<IActionResult> Getcountries([FromQuery] countryToFilterDTO filter)
{
var country = await _countryService.Getcountries(filter);
if (country == null)
return NotFound();
else
return Ok(country);

}

[Authorize(Policy = ClaimUtility.country_view)]
[HttpGet("getcountry/{id}")]
public async Task<IActionResult> Getcountry(int Id)
{
var country = await _countryService.GetcountryById(Id);
if (country == null)
{
return NotFound();
}

return Ok(new { data = country});

}

[Authorize(Policy = ClaimUtility.country_create)]
[HttpPost("addcountry")]
public async Task<IActionResult> Addcountry(countryToAddDTO model)
{
await _countryService.Addcountry(model);

return Ok();
}

[Authorize(Policy = ClaimUtility.country_update)]
[HttpPut("updatecountry/{id}")]
public async Task<IActionResult> Updatecountry([FromBody] countryDTO model)
{
await _countryService.Updatecountry(model);

return Ok();
}

[Authorize(Policy = ClaimUtility.country_delete)]
[HttpDelete("deletecountry/{id}")]
public async Task<IActionResult> Deletecountry(int Id)
{
await _countryService.Deletecountry(Id);
return Ok();
}
}
}

In this article, I tried to convey as much information about Zontroy Code Generator as possible. Thank you for reading. If I helped you even a little bit, don’t forget to press the applause button on the left 🙏

Resources:

https://zontroy.com/

--

--

Tolgahan İpek
CodeX
Writer for

💻 Computer Engineer | Android Developer 🔗 Github: https://github.com/tolgahanipek 🔗 My Website: tolgahanipek.github.io 📖 addicted to learning