<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Wanderson Batista</title>
    <description>The latest articles on DEV Community by Wanderson Batista (@wanderbatistaf).</description>
    <link>https://dev.to/wanderbatistaf</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F2709699%2F4a4af349-7255-4b02-83a2-4f7f8bc613d1.jpg</url>
      <title>DEV Community: Wanderson Batista</title>
      <link>https://dev.to/wanderbatistaf</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/wanderbatistaf"/>
    <language>en</language>
    <item>
      <title>CodeCraft IDE: An Open Source Platform for Interpretation, Conversion and Modernization of Legacy Systems in Informix 4GL</title>
      <dc:creator>Wanderson Batista</dc:creator>
      <pubDate>Fri, 13 Feb 2026 17:41:54 +0000</pubDate>
      <link>https://dev.to/wanderbatistaf/codecraft-ide-an-open-source-platform-for-interpretation-conversion-and-modernization-of-legacy-2m31</link>
      <guid>https://dev.to/wanderbatistaf/codecraft-ide-an-open-source-platform-for-interpretation-conversion-and-modernization-of-legacy-2m31</guid>
      <description>&lt;p&gt;&lt;strong&gt;Author:&lt;/strong&gt; Wanderson Freitas Batista &lt;br&gt;&lt;br&gt;
&lt;strong&gt;Contact:&lt;/strong&gt; &lt;a href="http://www.wbatista.com" rel="noopener noreferrer"&gt;www.wbatista.com&lt;/a&gt; &lt;br&gt;&lt;br&gt;
&lt;strong&gt;Repository:&lt;/strong&gt; &lt;a href="https://github.com/wanderbatistaf/CodeCraftIDE" rel="noopener noreferrer"&gt;https://github.com/wanderbatistaf/CodeCraftIDE&lt;/a&gt;&lt;br&gt;&lt;br&gt;
&lt;strong&gt;Live Demo:&lt;/strong&gt; &lt;a href="https://code-craft-ide-psi.vercel.app/" rel="noopener noreferrer"&gt;https://code-craft-ide-psi.vercel.app/&lt;/a&gt; &lt;br&gt;&lt;br&gt;
&lt;strong&gt;License:&lt;/strong&gt; MIT &lt;br&gt;&lt;/p&gt;


&lt;h2&gt;
  
  
  Abstract
&lt;/h2&gt;

&lt;p&gt;This paper presents &lt;strong&gt;CodeCraft IDE&lt;/strong&gt;, an open source platform developed in Python for interpretation, conversion, and modernization of legacy systems written in Informix 4GL. The proposed solution addresses one of the main challenges faced by organizations maintaining critical systems developed in the 1980s and 1990s: the need for modernization without operational disruption. CodeCraft IDE offers a complete ecosystem comprising a 4GL interpreter, a bidirectional 4GL↔Python converter, a modern web IDE, and an enterprise toolkit for large-scale migration. Results demonstrate that the tool can execute 4GL code, convert entire projects while preserving original code semantics, and provide detailed migration readiness reports. With over 470 automated tests and bilingual documentation, the project represents a significant contribution to the developer community working with legacy system modernization.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Keywords:&lt;/strong&gt; Informix 4GL, Legacy System Modernization, Interpreter, Code Converter, Python, Open Source, IDE, Software Migration&lt;/p&gt;


&lt;h2&gt;
  
  
  1. Introduction
&lt;/h2&gt;

&lt;p&gt;Legacy system modernization represents one of the greatest challenges in contemporary software engineering. It is estimated that trillions of lines of legacy code still support critical operations in sectors such as finance, healthcare, manufacturing, and government (Sommerville, 2016). Among the languages that compose this landscape, Informix 4GL (Fourth Generation Language) occupies a prominent place, having been widely adopted in the 1980s and 1990s for developing enterprise applications with strong relational database integration.&lt;/p&gt;

&lt;p&gt;Informix 4GL, originally developed by Informix Software Inc. (later acquired by IBM), offered a high-level syntax that simplified database operations, form manipulation, and report generation. Its popularity resulted in thousands of systems that, decades later, still operate in production, representing software assets with incalculable value in terms of accumulated business rules.&lt;/p&gt;

&lt;p&gt;The dilemma faced by organizations is complex: maintaining these systems implies growing maintenance costs, scarcity of qualified professionals, and integration limitations with modern technologies. On the other hand, complete rewriting presents significant risks, high costs, and potential loss of business knowledge embedded in legacy code.&lt;/p&gt;

&lt;p&gt;This work presents &lt;strong&gt;CodeCraft IDE&lt;/strong&gt;, an open source platform that offers an intermediate approach: allowing execution, analysis, and gradual conversion of 4GL code, enabling controlled and low-risk migration to modern technologies such as Python.&lt;/p&gt;
&lt;h3&gt;
  
  
  1.1 Objectives
&lt;/h3&gt;

&lt;p&gt;The CodeCraft IDE project was developed with the following objectives:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Interpretation&lt;/strong&gt;: Create an interpreter capable of executing Informix 4GL code in a Python environment, allowing testing and validation without the need for legacy infrastructure.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Conversion&lt;/strong&gt;: Develop a bidirectional converter that transforms 4GL code into idiomatic Python and vice versa, preserving semantics and facilitating gradual migration.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Tooling&lt;/strong&gt;: Provide a modern IDE and command-line tools that increase productivity when working with 4GL code.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Accessibility&lt;/strong&gt;: Make the solution available as free software, allowing organizations of all sizes to benefit without licensing costs.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;h3&gt;
  
  
  1.2 Article Structure
&lt;/h3&gt;

&lt;p&gt;The remainder of this article is organized as follows: Section 2 presents related works and the state of the art; Section 3 describes the architecture and methodology; Section 4 details the implementation of the processing core; Section 5 presents the Codecraft Studio IDE; Section 6 discusses the migration toolkit; Section 7 presents results and evaluation; Section 8 discusses limitations and future work; and Section 9 concludes the article.&lt;/p&gt;


&lt;h2&gt;
  
  
  2. Related Works and State of the Art
&lt;/h2&gt;
&lt;h3&gt;
  
  
  2.1 Legacy System Modernization
&lt;/h3&gt;

&lt;p&gt;The literature presents various approaches to legacy system modernization. Comella-Dorda et al. (2000) categorize strategies into three main groups: (1) complete replacement, (2) encapsulation/wrapping, and (3) migration/transformation. CodeCraft IDE falls into the third category, offering tools for gradual code transformation.&lt;/p&gt;

&lt;p&gt;Seacord et al. (2003) highlight that successful migration depends on tools that preserve business knowledge embedded in code. This premise guided the development of the converter, which prioritizes maintaining original semantics over premature optimizations.&lt;/p&gt;
&lt;h3&gt;
  
  
  2.2 Automatic Code Conversion
&lt;/h3&gt;

&lt;p&gt;Automatic code conversion between programming languages is an established field. Tools like 2to3 (Python 2 to Python 3) and various transpilers demonstrate the viability of this approach. However, converting fourth-generation languages like 4GL to general-purpose languages presents unique challenges due to strong coupling with databases and specific user interfaces.&lt;/p&gt;

&lt;p&gt;Waters (1988) observed that fourth-generation languages often embed complex operations in simple syntactic constructions, making conversion to third-generation languages more of an "expansion" task than "translation". CodeCraft IDE addresses this challenge through configurable mappings and commented code generation.&lt;/p&gt;
&lt;h3&gt;
  
  
  2.3 Commercial Solutions for 4GL
&lt;/h3&gt;

&lt;p&gt;Commercial solutions for 4GL modernization exist, such as those offered by Querix (Lycia) and Four Js (Genero). These solutions, while robust, present significant licensing costs and often create dependency on new proprietary environments. CodeCraft IDE differentiates itself by being completely open source and allowing conversion to pure Python, a widely adopted language with a vast ecosystem.&lt;/p&gt;
&lt;h3&gt;
  
  
  2.4 Interpreters and Compilers in Python
&lt;/h3&gt;

&lt;p&gt;Python has been widely used for building educational and practical interpreters and compilers. Works such as the book "Crafting Interpreters" (Nystrom, 2021) and projects like PLY (Python Lex-Yacc) provide theoretical and practical foundations that influenced the development of CodeCraft IDE.&lt;/p&gt;

&lt;p&gt;The choice of Python as both implementation and conversion target language was motivated by its readability, vast library ecosystem, and growing adoption in enterprise environments.&lt;/p&gt;


&lt;h2&gt;
  
  
  3. Architecture and Methodology
&lt;/h2&gt;
&lt;h3&gt;
  
  
  3.1 Architecture Overview
&lt;/h3&gt;

&lt;p&gt;CodeCraft IDE was designed following a layered modular architecture, as illustrated in Figure 1.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftpir0i7mo9tzfm3wbt61.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftpir0i7mo9tzfm3wbt61.png" alt="*Figure 1: Layered architecture of CodeCraft IDE showing main components and their interactions*" width="800" height="466"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The architecture comprises four main layers:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Presentation Layer&lt;/strong&gt;: Responsible for user interface, includes the web IDE (Codecraft Studio) built with React and Next.js, Monaco editor with multi-language support, form preview, integrated SSH terminal, database explorer, and command-line tools (CLI).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Service Layer (API)&lt;/strong&gt;: Implemented with FastAPI, provides REST endpoints for all system operations, including file management (local and SFTP), database operations, authentication and authorization.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Processing Core&lt;/strong&gt;: Contains fundamental components for 4GL code analysis and transformation, including lexical analyzer (Lexer), syntactic analyzer (Parser), interpreter, converter, dependency analyzer, SQL translator, and validation framework.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Data Layer&lt;/strong&gt;: Responsible for persistence and data access, includes adapters for different databases via JDBC and ORM, local and remote file system, session storage and authentication.&lt;/p&gt;
&lt;h3&gt;
  
  
  3.2 Processing Pipeline
&lt;/h3&gt;

&lt;p&gt;One of the central contributions of CodeCraft IDE is the implementation of a complete 4GL code processing pipeline &lt;strong&gt;developed from scratch in Python&lt;/strong&gt;. It's important to clarify that this pipeline does not use or depend on any component from the original Informix 4GL environment — it's an independent reimplementation designed specifically to enable interpretation, conversion, and analysis of legacy code in a modern environment.&lt;/p&gt;

&lt;p&gt;The pipeline follows the classic compiler architecture, adapted to support multiple backends:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;4GL Code → Lexer → Tokens → Parser → AST → Backend (Interpreter/Converter/Analyzer)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Why reimplement the pipeline?&lt;/strong&gt; The native Informix 4GL compiler is a proprietary tool that generates executable code specific to the Informix runtime. It doesn't provide access to the code's internal structure (AST), doesn't allow extension, and requires licensing and specific infrastructure. CodeCraft IDE solves these limitations by implementing each pipeline stage as an independent Python component:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Lexer (Lexical Analyzer)&lt;/strong&gt;: Developed with regular expressions and state machine, transforms 4GL source code into typed tokens. This component "understands" 4GL lexical syntax — keywords, identifiers, literals, operators — without depending on any external Informix library.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Parser (Syntactic Analyzer)&lt;/strong&gt;: Implements a recursive descent parser that builds a strongly-typed AST (Abstract Syntax Tree). The parser recognizes the complete 4GL grammar and organizes tokens into a hierarchical structure representing program semantics.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;AST (Abstract Syntax Tree)&lt;/strong&gt;: Intermediate data structure representing the program independently of original syntax. Each AST node is a Python dataclass with explicit types, facilitating programmatic manipulation.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Backends&lt;/strong&gt;: The AST feeds different backends according to the desired operation:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Interpreter&lt;/strong&gt;: Executes code directly, evaluating expressions and maintaining state&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Converter&lt;/strong&gt;: Generates equivalent Python code preserving semantics&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Analyzer&lt;/strong&gt;: Extracts metrics, dependencies, and information for reports&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This decoupled architecture allows CodeCraft IDE to process 4GL code on any machine with Python installed, without needing Informix licenses, database servers, or legacy infrastructure. A developer can simply install the package via &lt;code&gt;pip install fglinterpreter&lt;/code&gt; and immediately start analyzing, executing, or converting 4GL code.&lt;/p&gt;

&lt;h3&gt;
  
  
  3.3 Design Patterns Used
&lt;/h3&gt;

&lt;p&gt;Development employed several design patterns recognized by the software engineering community:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Visitor Pattern&lt;/strong&gt;: Used extensively for AST traversal, allowing new operations (interpretation, conversion, analysis) to be added without modifying tree node classes.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Strategy Pattern&lt;/strong&gt;: Implemented for different SQL backends (WBJDBC for direct queries, WBORM for object-relational mapping), allowing transparent strategy switching.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Factory Pattern&lt;/strong&gt;: Used for AST node creation and component instantiation, facilitating testing and extensibility.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Observer Pattern&lt;/strong&gt;: Implemented in the IDE for real-time preview and diagnostic updates as code is edited.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  3.4 Design Decisions
&lt;/h3&gt;

&lt;p&gt;Some design decisions deserve emphasis:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Typed AST&lt;/strong&gt;: Each AST node is a Python dataclass with explicit types, facilitating validation and tooling.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Preferential Immutability&lt;/strong&gt;: Whenever possible, immutable structures are used to avoid unexpected side effects.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Separation of Concerns&lt;/strong&gt;: The parser doesn't know the interpreter, which doesn't know the converter. Each component has a single responsibility.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Extensibility&lt;/strong&gt;: New node types, SQL commands, or backends can be added without modifying existing code.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  4. Processing Core Implementation
&lt;/h2&gt;

&lt;p&gt;This section details the implementation of CodeCraft IDE's central components responsible for processing 4GL code. All components described below were &lt;strong&gt;specifically developed for this project&lt;/strong&gt; in pure Python, without dependencies on the original Informix environment. This means organizations can use these tools to analyze, execute, and convert legacy 4GL code even without access to the original proprietary infrastructure.&lt;/p&gt;

&lt;h3&gt;
  
  
  4.1 Lexical Analysis (CodeCraft Lexer)
&lt;/h3&gt;

&lt;p&gt;The &lt;strong&gt;CodeCraft Lexer&lt;/strong&gt; is the first component of the processing pipeline. Its function is to perform &lt;em&gt;lexical analysis&lt;/em&gt; (or &lt;em&gt;tokenization&lt;/em&gt;) of 4GL source code: it reads the program text character by character and groups character sequences into meaningful units called &lt;em&gt;tokens&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What is a token?&lt;/strong&gt; A token is the smallest syntactic unit with its own meaning. For example, in the code snippet &lt;code&gt;LET x = 10&lt;/code&gt;, the lexer identifies four tokens:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;LET&lt;/code&gt; → keyword&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;x&lt;/code&gt; → identifier (variable name)&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;=&lt;/code&gt; → assignment operator&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;10&lt;/code&gt; → numeric literal (integer)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The CodeCraft lexer was implemented using &lt;strong&gt;regular expressions&lt;/strong&gt; and a &lt;strong&gt;finite state machine&lt;/strong&gt;. Regular expressions define the patterns each token type must follow (for example, an integer is a sequence of digits). The state machine controls recognition flow, especially for complex cases like strings with escape characters or block comments.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why reimplement the lexer?&lt;/strong&gt; The native 4GL compiler performs tokenization internally but doesn't expose this functionality. The CodeCraft lexer allows the IDE to offer features like real-time syntax highlighting, intelligent autocompletion, and precise error messages with line and column indication.&lt;/p&gt;

&lt;p&gt;Main characteristics of the implemented lexer:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Support for over 150 token types&lt;/li&gt;
&lt;li&gt;Case-insensitive keyword handling (4GL standard)&lt;/li&gt;
&lt;li&gt;Literal recognition: strings (single and double quotes), numbers (integer and decimal), dates&lt;/li&gt;
&lt;li&gt;Support for line comments (&lt;code&gt;--&lt;/code&gt; and &lt;code&gt;#&lt;/code&gt;) and block comments (&lt;code&gt;{ }&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;Position tracking (line and column) for precise error messages
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;TokenType&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;Enum&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="c1"&gt;# Keywords
&lt;/span&gt;    &lt;span class="n"&gt;DEFINE&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;DEFINE&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
    &lt;span class="n"&gt;LET&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;LET&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
    &lt;span class="n"&gt;IF&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;IF&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
    &lt;span class="n"&gt;THEN&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;THEN&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
    &lt;span class="n"&gt;ELSE&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;ELSE&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
    &lt;span class="n"&gt;END&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;END&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
    &lt;span class="n"&gt;FUNCTION&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;FUNCTION&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
    &lt;span class="n"&gt;RETURN&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;RETURN&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
    &lt;span class="c1"&gt;# SQL Keywords
&lt;/span&gt;    &lt;span class="n"&gt;SELECT&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;SELECT&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
    &lt;span class="n"&gt;INSERT&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;INSERT&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
    &lt;span class="n"&gt;UPDATE&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;UPDATE&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
    &lt;span class="n"&gt;DELETE&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;DELETE&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
    &lt;span class="c1"&gt;# ... over 150 token types
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  4.2 Syntactic Analysis (CodeCraft Parser)
&lt;/h3&gt;

&lt;p&gt;While the lexer identifies &lt;em&gt;what&lt;/em&gt; code elements are (tokens), the &lt;strong&gt;CodeCraft Parser&lt;/strong&gt; determines &lt;em&gt;how&lt;/em&gt; these elements relate, verifying they follow 4GL language grammar rules and building a structured program representation.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What is an AST?&lt;/strong&gt; The &lt;em&gt;Abstract Syntax Tree&lt;/em&gt; is a tree-shaped data structure representing the program's hierarchical structure. Each tree node corresponds to a language construction: a function declaration becomes a &lt;code&gt;FunctionDeclaration&lt;/code&gt; node, an IF command becomes an &lt;code&gt;IfStatement&lt;/code&gt; node with children representing the condition and then/else blocks, and so on.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why is an AST necessary?&lt;/strong&gt; The linear token sequence produced by the lexer doesn't capture program structure. For example, the tokens &lt;code&gt;IF&lt;/code&gt;, &lt;code&gt;x&lt;/code&gt;, &lt;code&gt;&amp;gt;&lt;/code&gt;, &lt;code&gt;0&lt;/code&gt;, &lt;code&gt;THEN&lt;/code&gt;, &lt;code&gt;DISPLAY&lt;/code&gt;, &lt;code&gt;"positive"&lt;/code&gt;, &lt;code&gt;END&lt;/code&gt;, &lt;code&gt;IF&lt;/code&gt; are just a flat list. The AST organizes these tokens into a hierarchy representing semantics: a conditional command with a condition (&lt;code&gt;x &amp;gt; 0&lt;/code&gt;) and an execution block (&lt;code&gt;DISPLAY "positive"&lt;/code&gt;). This structure allows the interpreter to execute code, the converter to generate equivalent Python, and the analyzer to extract metrics — all operating on the same intermediate representation.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Implementation technique&lt;/strong&gt;: The CodeCraft parser uses the &lt;em&gt;recursive descent parsing&lt;/em&gt; technique, where each 4GL grammar rule is implemented as a Python function. For example, there's a &lt;code&gt;parse_if_statement()&lt;/code&gt; function that recognizes IF commands, a &lt;code&gt;parse_function()&lt;/code&gt; function that recognizes function declarations, and so on. This approach results in readable and easily extensible code — adding support for a new 4GL construction involves implementing a new parsing function.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Difference from native compiler&lt;/strong&gt;: The original Informix 4GL compiler also performs parsing internally, but its goal is to generate optimized machine code for execution. The CodeCraft parser has different goals: generate an accessible AST that can be inspected, transformed, and used by multiple backends. This enables functionalities the native compiler doesn't offer, such as conversion to other languages or detailed static analysis.&lt;/p&gt;

&lt;p&gt;4GL constructions supported by the parser:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Variable Declarations&lt;/strong&gt;: Primitive types (INTEGER, CHAR, DECIMAL, DATE, etc.), one-dimensional and multidimensional arrays, simple and nested records, LIKE for column type inheritance&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Control Structures&lt;/strong&gt;: IF/THEN/ELSE, WHILE, FOR, FOREACH (cursor iteration), CASE/WHEN&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Functions and Procedures&lt;/strong&gt;: Declaration, parameters, local variables, RETURN&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Embedded SQL Commands&lt;/strong&gt;: SELECT (including INTO), INSERT, UPDATE, DELETE, cursors (DECLARE, OPEN, FETCH, CLOSE)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Form Manipulation&lt;/strong&gt;: OPEN FORM, DISPLAY, INPUT, validations&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Error Handling&lt;/strong&gt;: WHENEVER ERROR CONTINUE/STOP/CALL
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="nd"&gt;@dataclass&lt;/span&gt;
&lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;FunctionDeclaration&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;ASTNode&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;str&lt;/span&gt;
    &lt;span class="n"&gt;parameters&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;List&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;Parameter&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
    &lt;span class="n"&gt;local_variables&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;List&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;VariableDeclaration&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
    &lt;span class="n"&gt;body&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;List&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;Statement&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
    &lt;span class="n"&gt;return_type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;Optional&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;TypeAnnotation&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="bp"&gt;None&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  4.3 CodeCraft Interpreter
&lt;/h3&gt;

&lt;p&gt;The &lt;strong&gt;CodeCraft Interpreter&lt;/strong&gt; is the component that makes it possible to &lt;em&gt;execute&lt;/em&gt; 4GL code directly in Python, without needing the original Informix runtime. It traverses the AST generated by the parser and executes each node, maintaining program state (variables, database connections, etc.) in memory.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Difference between interpreter and compiler&lt;/strong&gt;: The native 4GL compiler translates source code to executable machine code &lt;em&gt;once&lt;/em&gt;, generating a program that can be executed repeatedly. The CodeCraft interpreter, on the other hand, &lt;em&gt;executes&lt;/em&gt; the code directly at each invocation, without generating an intermediate executable. This approach is ideal for development, testing, and validation, where convenience trumps maximum performance.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Interpreter use cases&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Quickly test 4GL code snippets without compiling&lt;/li&gt;
&lt;li&gt;Validate that code logic works as expected&lt;/li&gt;
&lt;li&gt;Execute migration and validation scripts&lt;/li&gt;
&lt;li&gt;Debugging and prototyping during modernization&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The interpreter implements the &lt;em&gt;Visitor&lt;/em&gt; pattern to traverse the AST and execute corresponding operations. It maintains an &lt;em&gt;environment&lt;/em&gt; with nested scopes for local and global variables, simulating original 4GL runtime behavior.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;Interpreter&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;ASTVisitor&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;__init__&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;global_env&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;Environment&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
        &lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;current_env&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;global_env&lt;/span&gt;
        &lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;db_connection&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="bp"&gt;None&lt;/span&gt;

    &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;visit_LetStatement&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;node&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;LetStatement&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="n"&gt;value&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;evaluate&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;node&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;value&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;current_env&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;set&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;node&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;variable&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;value&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;visit_IfStatement&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;node&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;IfStatement&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="n"&gt;condition&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;evaluate&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;node&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;condition&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;_is_truthy&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;condition&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
            &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;execute_block&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;node&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;then_branch&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="k"&gt;elif&lt;/span&gt; &lt;span class="n"&gt;node&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;else_branch&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
            &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;execute_block&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;node&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;else_branch&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;visit_SelectStatement&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;node&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;SelectStatement&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="n"&gt;sql&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;_build_sql&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;node&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="n"&gt;params&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;_extract_parameters&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;node&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="n"&gt;result&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;db_connection&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;execute&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;sql&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;params&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;node&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;into_variables&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
            &lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;_assign_results&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;node&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;into_variables&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;result&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;result&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  4.4 CodeCraft 4GL → Python Converter
&lt;/h3&gt;

&lt;p&gt;The &lt;strong&gt;CodeCraft Converter&lt;/strong&gt; represents perhaps the most valuable functionality for organizations in modernization processes: the ability to automatically transform 4GL code into equivalent Python code.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How does conversion work?&lt;/strong&gt; The converter uses the same AST generated by the parser, but instead of executing each node (like the interpreter does), it generates equivalent Python code. Each AST node type has a corresponding translation rule. For example:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;DEFINE x INTEGER&lt;/code&gt; → &lt;code&gt;x: int = 0&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;LET x = y + 1&lt;/code&gt; → &lt;code&gt;x = y + 1&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;IF condition THEN ... END IF&lt;/code&gt; → &lt;code&gt;if condition: ...&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Semantic preservation&lt;/strong&gt;: The goal isn't to generate "beautiful" Python code, but rather code that behaves &lt;em&gt;exactly&lt;/em&gt; like the original 4GL. This means even idiomatic 4GL constructions that have no direct Python equivalent are translated to preserve behavior. Comments are automatically inserted when translation isn't trivial.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Pythonic code&lt;/strong&gt;: While the priority is preserving semantics, the converter follows Pythonic conventions whenever possible: uses dataclasses for records, type hints to document types, and idiomatic Python structures. The result is code that Python developers can read, maintain, and evolve.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Conversion Example:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Original 4GL Code:&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="n"&gt;DEFINE&lt;/span&gt; &lt;span class="n"&gt;l_customer&lt;/span&gt; &lt;span class="n"&gt;RECORD&lt;/span&gt;
    &lt;span class="n"&gt;id&lt;/span&gt; &lt;span class="nb"&gt;INTEGER&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;name&lt;/span&gt; &lt;span class="nb"&gt;CHAR&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;50&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
    &lt;span class="n"&gt;balance&lt;/span&gt; &lt;span class="nb"&gt;DECIMAL&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;END&lt;/span&gt; &lt;span class="n"&gt;RECORD&lt;/span&gt;

&lt;span class="k"&gt;FUNCTION&lt;/span&gt; &lt;span class="n"&gt;get_customer&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;p_id&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;DEFINE&lt;/span&gt; &lt;span class="n"&gt;p_id&lt;/span&gt; &lt;span class="nb"&gt;INTEGER&lt;/span&gt;

    &lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="k"&gt;INTO&lt;/span&gt; &lt;span class="n"&gt;l_customer&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;
    &lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;customers&lt;/span&gt;
    &lt;span class="k"&gt;WHERE&lt;/span&gt; &lt;span class="n"&gt;id&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;p_id&lt;/span&gt;

    &lt;span class="n"&gt;IF&lt;/span&gt; &lt;span class="n"&gt;l_customer&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;balance&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="mi"&gt;1000&lt;/span&gt; &lt;span class="k"&gt;THEN&lt;/span&gt;
        &lt;span class="k"&gt;RETURN&lt;/span&gt; &lt;span class="nv"&gt;"Premium"&lt;/span&gt;
    &lt;span class="k"&gt;ELSE&lt;/span&gt;
        &lt;span class="k"&gt;RETURN&lt;/span&gt; &lt;span class="nv"&gt;"Standard"&lt;/span&gt;
    &lt;span class="k"&gt;END&lt;/span&gt; &lt;span class="n"&gt;IF&lt;/span&gt;
&lt;span class="k"&gt;END&lt;/span&gt; &lt;span class="k"&gt;FUNCTION&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;em&gt;Generated Python Code:&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;dataclasses&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;dataclass&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;decimal&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;Decimal&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;typing&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;Optional&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;wbjdbc&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;Database&lt;/span&gt;

&lt;span class="nd"&gt;@dataclass&lt;/span&gt;
&lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;CustomerRecord&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="nb"&gt;id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;int&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;
    &lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;str&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sh"&gt;""&lt;/span&gt;
    &lt;span class="n"&gt;balance&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;Decimal&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;Decimal&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;0.00&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;l_customer&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;CustomerRecord&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;

&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;get_customer&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;p_id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;int&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="nb"&gt;str&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="k"&gt;global&lt;/span&gt; &lt;span class="n"&gt;l_customer&lt;/span&gt;

    &lt;span class="n"&gt;db&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;Database&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get_connection&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
    &lt;span class="n"&gt;result&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;db&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;execute_one&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
        &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;SELECT * FROM customers WHERE id = ?&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;p_id&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
    &lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;result&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="n"&gt;l_customer&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nb"&gt;id&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;result&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;id&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
        &lt;span class="n"&gt;l_customer&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;name&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;result&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;name&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
        &lt;span class="n"&gt;l_customer&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;balance&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;Decimal&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;str&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;result&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;balance&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;]))&lt;/span&gt;

    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;l_customer&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;balance&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="nc"&gt;Decimal&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;1000&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Premium&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
    &lt;span class="k"&gt;else&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Standard&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  4.5 SQL Translation
&lt;/h3&gt;

&lt;p&gt;The SQL translation module supports two backends:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;WBJDBC (Direct SQL)&lt;/strong&gt;: Generates code that executes parameterized SQL queries directly:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="c1"&gt;# 4GL: SELECT * FROM customers WHERE status = l_status
&lt;/span&gt;&lt;span class="n"&gt;db&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;execute&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;SELECT * FROM customers WHERE status = ?&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;l_status&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;WBORM (Object-Relational Mapping)&lt;/strong&gt;: Generates code using a lightweight ORM for more abstract operations:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="c1"&gt;# 4GL: SELECT * FROM customers WHERE status = l_status
&lt;/span&gt;&lt;span class="n"&gt;Customer&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;select&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nf"&gt;where&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;status&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;l_status&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;all&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The translator handles complex clauses including:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;WHERE with multiple conditions (AND, OR, NOT)&lt;/li&gt;
&lt;li&gt;ORDER BY with multiple columns and directions&lt;/li&gt;
&lt;li&gt;GROUP BY and HAVING&lt;/li&gt;
&lt;li&gt;Implicit and explicit JOINs&lt;/li&gt;
&lt;li&gt;Subqueries in WHERE clauses&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  4.6 Dependency Analysis
&lt;/h3&gt;

&lt;p&gt;For multi-file projects, the dependency analyzer:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Extracts all function definitions from each file&lt;/li&gt;
&lt;li&gt;Identifies all function calls&lt;/li&gt;
&lt;li&gt;Builds a dependency graph&lt;/li&gt;
&lt;li&gt;Detects cycles (circular dependencies)&lt;/li&gt;
&lt;li&gt;Calculates topological order for conversion
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;DependencyAnalyzer&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;analyze&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;project_path&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;str&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;DependencyGraph&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="n"&gt;functions&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;_extract_all_functions&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;project_path&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="n"&gt;calls&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;_extract_all_calls&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;project_path&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="n"&gt;graph&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;_build_graph&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;functions&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;calls&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="n"&gt;cycles&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;graph&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;detect_cycles&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nc"&gt;DependencyGraph&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
            &lt;span class="n"&gt;nodes&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;functions&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="n"&gt;edges&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;calls&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="n"&gt;cycles&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;cycles&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="n"&gt;conversion_order&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;graph&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;topological_sort&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
        &lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  5. Codecraft Studio: The Web IDE
&lt;/h2&gt;

&lt;p&gt;One of CodeCraft IDE's differentiators is the integrated web IDE, called &lt;strong&gt;Codecraft Studio&lt;/strong&gt;, developed with modern technologies.&lt;/p&gt;

&lt;h3&gt;
  
  
  5.1 Technology Stack
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Frontend&lt;/strong&gt;: React 18, Next.js 15, TypeScript&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;UI Components&lt;/strong&gt;: shadcn/ui, Radix UI, Tailwind CSS&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Editor&lt;/strong&gt;: Monaco Editor (same engine as VS Code)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;State&lt;/strong&gt;: React Context API&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Communication&lt;/strong&gt;: REST API, WebSocket for real-time updates&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  5.2 Interface Overview
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F24wlydx4yfuw5onjpzaz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F24wlydx4yfuw5onjpzaz.png" alt="*Figure 2: Codecraft Studio main interface showing code editor with syntax highlighting, file explorer on the left, and console panel at the bottom*" width="800" height="397"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The interface is organized into functional regions:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Top Bar&lt;/strong&gt;: Menus (File, Edit, View, Run, Database, Help), mode indicators (Local/Remote), session information&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Left Sidebar&lt;/strong&gt;: File explorer with project support (.ccp), database explorer&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Central Area&lt;/strong&gt;: Code editor with tab system, support for multiple simultaneous files&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Bottom Panel&lt;/strong&gt;: Console (execution output), SSH Terminal, Debug, SQL Query&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  5.3 Code Editor
&lt;/h3&gt;

&lt;p&gt;The editor uses Monaco Editor with custom configurations:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7bvgzvsv9ewg1h3o2qtk.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7bvgzvsv9ewg1h3o2qtk.png" alt="*Figure 3: Monaco Editor displaying 4GL code with syntax highlighting, showing keywords, strings, numbers, and comments in distinct colors*" width="800" height="278"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Implemented features:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Syntax Highlighting&lt;/strong&gt;: Complete support for 4GL, PER (forms), SQL, Python, CSS&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Diagnostics&lt;/strong&gt;: Syntax errors displayed in real-time with underlining and tooltips&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Quick Fixes&lt;/strong&gt;: Correction suggestions for common errors&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Find &amp;amp; Replace&lt;/strong&gt;: Search with regular expression support&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Multiple Selections&lt;/strong&gt;: Simultaneous editing of multiple occurrences&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  5.4 Form Preview
&lt;/h3&gt;

&lt;p&gt;For form files (.per and .fm2 Lycia), Studio offers real-time preview:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fckcna7ylrj1ofe366vip.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fckcna7ylrj1ofe366vip.png" alt="*Figure 4: Side-by-side visualization of .per form code and its rendered preview, showing fields, labels, and layout*" width="800" height="293"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The preview interprets:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Field definitions and types&lt;/li&gt;
&lt;li&gt;Positioning (row/column)&lt;/li&gt;
&lt;li&gt;Visual attributes (colors, styles)&lt;/li&gt;
&lt;li&gt;Declarative validations&lt;/li&gt;
&lt;li&gt;Grid layouts (for Lycia)&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  5.5 Database Explorer
&lt;/h3&gt;

&lt;p&gt;The IDE includes a database explorer that allows viewing and interacting with the structure:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0ijdnlpdv5ovfasau232.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0ijdnlpdv5ovfasau232.png" alt="*Figure 5: Database Explorer showing hierarchy of schemas, tables, and columns with data types*" width="252" height="488"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Features:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Connection to multiple databases (Informix, PostgreSQL, MySQL, Oracle)&lt;/li&gt;
&lt;li&gt;Schema and table visualization&lt;/li&gt;
&lt;li&gt;Column details (name, type, constraints)&lt;/li&gt;
&lt;li&gt;SQL Query panel for ad-hoc query execution&lt;/li&gt;
&lt;li&gt;Result export&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  5.6 Integrated SSH Terminal
&lt;/h3&gt;

&lt;p&gt;For environments where 4GL code resides on remote servers:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fybkd6wfz1ylcrd5ih6bm.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fybkd6wfz1ylcrd5ih6bm.png" alt="*Figure 6: Integrated SSH terminal allowing remote server command execution directly from the IDE*" width="800" height="149"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The terminal uses credentials from the configured database connection, simplifying access to development and production environments.&lt;/p&gt;

&lt;h3&gt;
  
  
  5.7 Remote Mode (SFTP)
&lt;/h3&gt;

&lt;p&gt;Studio supports editing files on remote servers via SFTP:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Remote file system navigation&lt;/li&gt;
&lt;li&gt;Opening and editing files directly on the server&lt;/li&gt;
&lt;li&gt;Automatic synchronization on save&lt;/li&gt;
&lt;li&gt;Visual remote mode indicator in top bar&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  5.8 Visual Conversion
&lt;/h3&gt;

&lt;p&gt;The conversion process can be initiated directly from the IDE:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fq6og01thi5t74zw6lmwj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fq6og01thi5t74zw6lmwj.png" alt="*Figure 7: Run menu showing 4GL to Python and Python to 4GL conversion options*" width="800" height="368"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The converted file is automatically:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Generated in the same directory as the original&lt;/li&gt;
&lt;li&gt;Opened in a new tab&lt;/li&gt;
&lt;li&gt;Formatted with Black (for Python)&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  5.9 Integrated Documentation
&lt;/h3&gt;

&lt;p&gt;Documentation system accessible via Help menu or Ctrl+Shift+H shortcut:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9sbso17yvkm5ludfsdrf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9sbso17yvkm5ludfsdrf.png" alt="*Figure 8: Documentation dialog showing topic navigation, language selector (Portuguese/English), and formatted content*" width="800" height="559"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Documentation includes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;FAQ (Frequently Asked Questions)&lt;/li&gt;
&lt;li&gt;Interface overview&lt;/li&gt;
&lt;li&gt;Files and projects guide&lt;/li&gt;
&lt;li&gt;Shortcut reference&lt;/li&gt;
&lt;li&gt;Troubleshooting&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  6. Enterprise Migration Toolkit
&lt;/h2&gt;

&lt;p&gt;For large-scale migration projects, CodeCraft IDE offers a complete toolkit via command line.&lt;/p&gt;

&lt;h3&gt;
  
  
  6.1 Batch Conversion
&lt;/h3&gt;

&lt;p&gt;The &lt;code&gt;batch-convert&lt;/code&gt; command processes entire directories preserving structure:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Basic conversion&lt;/span&gt;
fgl batch-convert ./src_4gl ./output_python

&lt;span class="c"&gt;# With dependency resolution&lt;/span&gt;
fgl batch-convert ./src_4gl ./output &lt;span class="nt"&gt;--resolve-dependencies&lt;/span&gt;

&lt;span class="c"&gt;# Specifying SQL backend&lt;/span&gt;
fgl batch-convert ./src_4gl ./output &lt;span class="nt"&gt;--sql-backend&lt;/span&gt; wborm
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Features:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Directory structure preservation&lt;/li&gt;
&lt;li&gt;Parallel processing (configurable)&lt;/li&gt;
&lt;li&gt;Real-time progress reporting&lt;/li&gt;
&lt;li&gt;Robust error handling (continues despite individual failures)&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  6.2 Dependency Analysis
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;fgl analyze-deps ./project
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Example output:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;╔══════════════════════════════════════════════════════╗
║           Dependency Analysis Report                 ║
╠══════════════════════════════════════════════════════╣
║ Files analyzed:        47                            ║
║ Functions found:       312                           ║
║ Cross-file calls:      89                            ║
║ Circular dependencies: 0 ✓                           ║
╠══════════════════════════════════════════════════════╣
║ Recommended conversion order:                        ║
║ 1. globals.4gl                                       ║
║ 2. utils.4gl                                         ║
║ 3. database.4gl                                      ║
║ 4. business_logic.4gl                                ║
║ ...                                                  ║
╚══════════════════════════════════════════════════════╝
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  6.3 Migration Reports
&lt;/h3&gt;

&lt;p&gt;The toolkit generates detailed reports in multiple formats:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Interactive HTML report&lt;/span&gt;
fgl migration-report ./project &lt;span class="nt"&gt;--format&lt;/span&gt; html &lt;span class="nt"&gt;--output&lt;/span&gt; report.html

&lt;span class="c"&gt;# JSON report for integration&lt;/span&gt;
fgl migration-report ./project &lt;span class="nt"&gt;--format&lt;/span&gt; json &lt;span class="nt"&gt;--output&lt;/span&gt; report.json

&lt;span class="c"&gt;# Markdown report&lt;/span&gt;
fgl migration-report ./project &lt;span class="nt"&gt;--format&lt;/span&gt; markdown &lt;span class="nt"&gt;--output&lt;/span&gt; report.md
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The report includes:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Metric&lt;/th&gt;
&lt;th&gt;Description&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Migration Readiness Score&lt;/td&gt;
&lt;td&gt;0-100 score indicating readiness&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Mapped Constructions&lt;/td&gt;
&lt;td&gt;Percentage of code with direct mapping&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Warnings per File&lt;/td&gt;
&lt;td&gt;Count of potential issues&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Unsupported Constructions&lt;/td&gt;
&lt;td&gt;List of what requires manual intervention&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Recommendations&lt;/td&gt;
&lt;td&gt;Suggested prioritized actions&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  6.4 Validation Framework
&lt;/h3&gt;

&lt;p&gt;To ensure conversion preserves original semantics:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Individual validation&lt;/span&gt;
fgl validate original.4gl converted.py

&lt;span class="c"&gt;# Batch validation with JUnit report&lt;/span&gt;
fgl validate-batch ./tests &lt;span class="nt"&gt;--output&lt;/span&gt; results.xml &lt;span class="nt"&gt;--format&lt;/span&gt; junit
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Validation modes:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Mode&lt;/th&gt;
&lt;th&gt;Description&lt;/th&gt;
&lt;th&gt;Use&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;exact&lt;/td&gt;
&lt;td&gt;Outputs must be byte-for-byte identical&lt;/td&gt;
&lt;td&gt;Deterministic tests&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;normalized&lt;/td&gt;
&lt;td&gt;Ignores whitespace and formatting differences&lt;/td&gt;
&lt;td&gt;Most cases&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;semantic&lt;/td&gt;
&lt;td&gt;Allows configurable numerical tolerance&lt;/td&gt;
&lt;td&gt;Floating-point calculations&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Custom validators can be registered for specific cases:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="nd"&gt;@validator_registry.register&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;numeric_tolerance&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;numeric_validator&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;expected&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;actual&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;tolerance&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mf"&gt;0.001&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nf"&gt;abs&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;float&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;expected&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="nf"&gt;float&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;actual&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="n"&gt;tolerance&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  6.5 CI/CD Integration
&lt;/h3&gt;

&lt;p&gt;Example GitHub Actions workflow for automated migration:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;4GL Migration Pipeline&lt;/span&gt;
&lt;span class="na"&gt;on&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;push&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;paths&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s1"&gt;'&lt;/span&gt;&lt;span class="s"&gt;src/**/*.4gl'&lt;/span&gt;

&lt;span class="na"&gt;jobs&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;migrate-and-validate&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;runs-on&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;ubuntu-latest&lt;/span&gt;
    &lt;span class="na"&gt;steps&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;uses&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;actions/checkout@v4&lt;/span&gt;

      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Setup Python&lt;/span&gt;
        &lt;span class="na"&gt;uses&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;actions/setup-python@v5&lt;/span&gt;
        &lt;span class="na"&gt;with&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
          &lt;span class="na"&gt;python-version&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'&lt;/span&gt;&lt;span class="s"&gt;3.11'&lt;/span&gt;

      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Install CodeCraft&lt;/span&gt;
        &lt;span class="na"&gt;run&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;pip install fglinterpreter[all]&lt;/span&gt;

      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Convert 4GL to Python&lt;/span&gt;
        &lt;span class="na"&gt;run&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="pi"&gt;|&lt;/span&gt;
          &lt;span class="s"&gt;fgl batch-convert ./src ./dist \&lt;/span&gt;
            &lt;span class="s"&gt;--resolve-dependencies \&lt;/span&gt;
            &lt;span class="s"&gt;--sql-backend wbjdbc&lt;/span&gt;

      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Validate Conversion&lt;/span&gt;
        &lt;span class="na"&gt;run&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="pi"&gt;|&lt;/span&gt;
          &lt;span class="s"&gt;fgl validate-batch ./tests \&lt;/span&gt;
            &lt;span class="s"&gt;--output results.xml \&lt;/span&gt;
            &lt;span class="s"&gt;--format junit&lt;/span&gt;

      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Generate Migration Report&lt;/span&gt;
        &lt;span class="na"&gt;run&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="pi"&gt;|&lt;/span&gt;
          &lt;span class="s"&gt;fgl migration-report ./src \&lt;/span&gt;
            &lt;span class="s"&gt;--format html \&lt;/span&gt;
            &lt;span class="s"&gt;--output migration-report.html&lt;/span&gt;

      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Upload Report&lt;/span&gt;
        &lt;span class="na"&gt;uses&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;actions/upload-artifact@v4&lt;/span&gt;
        &lt;span class="na"&gt;with&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
          &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;migration-report&lt;/span&gt;
          &lt;span class="na"&gt;path&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;migration-report.html&lt;/span&gt;

      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Publish Test Results&lt;/span&gt;
        &lt;span class="na"&gt;uses&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;EnricoMi/publish-unit-test-result-action@v2&lt;/span&gt;
        &lt;span class="na"&gt;if&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;always()&lt;/span&gt;
        &lt;span class="na"&gt;with&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
          &lt;span class="na"&gt;files&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;results.xml&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  7. Results and Evaluation
&lt;/h2&gt;

&lt;h3&gt;
  
  
  7.1 Test Coverage
&lt;/h3&gt;

&lt;p&gt;The project maintains an extensive automated test suite:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Component&lt;/th&gt;
&lt;th&gt;Tests&lt;/th&gt;
&lt;th&gt;Coverage&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Lexer&lt;/td&gt;
&lt;td&gt;45&lt;/td&gt;
&lt;td&gt;98%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Parser&lt;/td&gt;
&lt;td&gt;78&lt;/td&gt;
&lt;td&gt;95%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Interpreter&lt;/td&gt;
&lt;td&gt;112&lt;/td&gt;
&lt;td&gt;92%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Converter&lt;/td&gt;
&lt;td&gt;89&lt;/td&gt;
&lt;td&gt;94%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Batch Converter&lt;/td&gt;
&lt;td&gt;21&lt;/td&gt;
&lt;td&gt;100%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Dependency Resolver&lt;/td&gt;
&lt;td&gt;26&lt;/td&gt;
&lt;td&gt;100%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;SQL Translator&lt;/td&gt;
&lt;td&gt;34&lt;/td&gt;
&lt;td&gt;100%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Validation Framework&lt;/td&gt;
&lt;td&gt;48&lt;/td&gt;
&lt;td&gt;100%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Total&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;470+&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;~96%&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Tests are automatically executed on every commit via GitHub Actions, ensuring non-regression.&lt;/p&gt;

&lt;h3&gt;
  
  
  7.2 Supported 4GL Constructions
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Category&lt;/th&gt;
&lt;th&gt;Constructions&lt;/th&gt;
&lt;th&gt;Support&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Variables&lt;/td&gt;
&lt;td&gt;DEFINE, LET, primitive types&lt;/td&gt;
&lt;td&gt;✅ Complete&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Arrays&lt;/td&gt;
&lt;td&gt;ARRAY OF, multiple dimensions&lt;/td&gt;
&lt;td&gt;✅ Complete&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Records&lt;/td&gt;
&lt;td&gt;RECORD, LIKE, nested&lt;/td&gt;
&lt;td&gt;✅ Complete&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Control&lt;/td&gt;
&lt;td&gt;IF, WHILE, FOR, FOREACH, CASE&lt;/td&gt;
&lt;td&gt;✅ Complete&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Functions&lt;/td&gt;
&lt;td&gt;FUNCTION, RETURN, parameters&lt;/td&gt;
&lt;td&gt;✅ Complete&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;SQL&lt;/td&gt;
&lt;td&gt;SELECT, INSERT, UPDATE, DELETE&lt;/td&gt;
&lt;td&gt;✅ Complete&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Cursors&lt;/td&gt;
&lt;td&gt;DECLARE, OPEN, FETCH, CLOSE&lt;/td&gt;
&lt;td&gt;✅ Complete&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Transactions&lt;/td&gt;
&lt;td&gt;BEGIN WORK, COMMIT, ROLLBACK&lt;/td&gt;
&lt;td&gt;✅ Complete&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Errors&lt;/td&gt;
&lt;td&gt;WHENEVER ERROR&lt;/td&gt;
&lt;td&gt;✅ Complete&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Forms&lt;/td&gt;
&lt;td&gt;OPEN FORM, DISPLAY, INPUT&lt;/td&gt;
&lt;td&gt;⚠️ Partial&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Reports&lt;/td&gt;
&lt;td&gt;START REPORT, OUTPUT TO&lt;/td&gt;
&lt;td&gt;⚠️ Partial&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Menus&lt;/td&gt;
&lt;td&gt;MENU, COMMAND&lt;/td&gt;
&lt;td&gt;⚠️ Partial&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  7.3 Conversion Benchmark
&lt;/h3&gt;

&lt;p&gt;Tests performed with production codebase (anonymized):&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Metric&lt;/th&gt;
&lt;th&gt;Value&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Files processed&lt;/td&gt;
&lt;td&gt;234&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;4GL lines of code&lt;/td&gt;
&lt;td&gt;47,832&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Functions converted&lt;/td&gt;
&lt;td&gt;1,247&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Conversion time&lt;/td&gt;
&lt;td&gt;12.4s&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Success rate&lt;/td&gt;
&lt;td&gt;97.8%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Warnings generated&lt;/td&gt;
&lt;td&gt;156&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Blocking errors&lt;/td&gt;
&lt;td&gt;5&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The 5 blocking errors were related to proprietary extensions specific to the client's environment, not standard 4GL syntax.&lt;/p&gt;

&lt;h3&gt;
  
  
  7.4 Interpreter Performance
&lt;/h3&gt;

&lt;p&gt;Execution time comparison between native 4GL environment and CodeCraft IDE:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Operation&lt;/th&gt;
&lt;th&gt;Native 4GL&lt;/th&gt;
&lt;th&gt;CodeCraft&lt;/th&gt;
&lt;th&gt;Overhead&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Simple loop (10k iterations)&lt;/td&gt;
&lt;td&gt;0.8s&lt;/td&gt;
&lt;td&gt;1.2s&lt;/td&gt;
&lt;td&gt;1.5x&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Array processing (1k elements)&lt;/td&gt;
&lt;td&gt;1.5s&lt;/td&gt;
&lt;td&gt;2.1s&lt;/td&gt;
&lt;td&gt;1.4x&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;String operations (concatenation)&lt;/td&gt;
&lt;td&gt;0.5s&lt;/td&gt;
&lt;td&gt;0.7s&lt;/td&gt;
&lt;td&gt;1.4x&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;SQL query (100 rows)&lt;/td&gt;
&lt;td&gt;0.3s&lt;/td&gt;
&lt;td&gt;0.4s&lt;/td&gt;
&lt;td&gt;1.3x&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Average&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;-&lt;/td&gt;
&lt;td&gt;-&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;1.4x&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The average 1.4x overhead is acceptable considering that:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The interpreter is primarily intended for testing and validation&lt;/li&gt;
&lt;li&gt;Production execution would use converted Python code&lt;/li&gt;
&lt;li&gt;Flexibility and portability offset the performance difference&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  7.5 Comparison with Existing Solutions
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Feature&lt;/th&gt;
&lt;th&gt;CodeCraft IDE&lt;/th&gt;
&lt;th&gt;Solution A (Commercial)&lt;/th&gt;
&lt;th&gt;Solution B (Commercial)&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;License&lt;/td&gt;
&lt;td&gt;MIT (Free)&lt;/td&gt;
&lt;td&gt;Proprietary ($$$)&lt;/td&gt;
&lt;td&gt;Proprietary ($$)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;4GL Interpreter&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;❌&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Python Conversion&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;❌&lt;/td&gt;
&lt;td&gt;❌&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Integrated IDE&lt;/td&gt;
&lt;td&gt;✅ (Web)&lt;/td&gt;
&lt;td&gt;✅ (Desktop)&lt;/td&gt;
&lt;td&gt;✅ (Desktop)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Open Source&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;❌&lt;/td&gt;
&lt;td&gt;❌&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Migration Reports&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;⚠️&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;CI/CD Integration&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;⚠️&lt;/td&gt;
&lt;td&gt;❌&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h2&gt;
  
  
  8. Limitations and Future Work
&lt;/h2&gt;

&lt;h3&gt;
  
  
  8.1 Current Limitations
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Interactive Forms&lt;/strong&gt;: Support for form constructions (OPEN FORM, INPUT, DISPLAY) is functional for syntactic validation and static preview, but generation of equivalent web interfaces is not yet complete.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Reports&lt;/strong&gt;: Report commands (START REPORT, OUTPUT TO REPORT) are parsed and partially interpreted, but complex report generation requires refinement.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Proprietary Extensions&lt;/strong&gt;: Vendor-specific extensions (Querix, Four Js) are not supported, focusing on standard Informix 4GL syntax.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Debugging&lt;/strong&gt;: While the interpreter supports execution, there's no visual debugger yet with breakpoints and variable inspection.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  8.2 Roadmap
&lt;/h3&gt;

&lt;p&gt;The following developments are planned:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Desktop Application (Electron)&lt;/strong&gt;: Desktop version of Codecraft Studio for offline use, with better operating system integration.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Visual Debugger&lt;/strong&gt;: Implementation of step-by-step debugging with breakpoints, watches, and call stack visualization.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Web Interface Generator&lt;/strong&gt;: Conversion of 4GL forms to React components, enabling complete presentation layer modernization.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;IDE Plugins&lt;/strong&gt;: Extensions for VS Code and IntelliJ with syntax highlighting and CodeCraft backend integration.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;AI-Assisted Migration&lt;/strong&gt;: Use of language models for refactoring suggestions and automatic resolution of unmapped constructions.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  8.3 Community Contributions
&lt;/h3&gt;

&lt;p&gt;As an open source project, contributions are welcome in several areas:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Support for new databases&lt;/li&gt;
&lt;li&gt;Coverage of specific 4GL dialects&lt;/li&gt;
&lt;li&gt;Documentation translation to other languages&lt;/li&gt;
&lt;li&gt;Testing with real (sanitized) codebases&lt;/li&gt;
&lt;li&gt;Bug reports and feature requests&lt;/li&gt;
&lt;li&gt;Documentation and example improvements&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  9. Conclusion
&lt;/h2&gt;

&lt;p&gt;This article presented &lt;strong&gt;CodeCraft IDE&lt;/strong&gt;, a comprehensive open source platform for interpretation, conversion, and modernization of legacy systems in Informix 4GL. The solution offers a functional interpreter implemented in Python, bidirectional converter to Python with semantic preservation, modern web IDE with professional features, and enterprise toolkit for large-scale migration.&lt;/p&gt;

&lt;p&gt;Results obtained demonstrate that the tool achieves its main objectives:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Interpretation&lt;/strong&gt;: Correct 4GL code execution with acceptable 1.4x overhead&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Conversion&lt;/strong&gt;: 97.8% success rate on real production code&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Quality&lt;/strong&gt;: Over 470 automated tests with 96% coverage&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Usability&lt;/strong&gt;: Modern web IDE with experience comparable to commercial tools&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The choice for open source licensing (MIT) reflects the conviction that modernization tools should be accessible to organizations of all sizes. The barrier to entry for modernization shouldn't be financial, especially when organizations already face the inherent technical challenges of the process.&lt;/p&gt;

&lt;p&gt;CodeCraft IDE doesn't claim to be the definitive solution for all 4GL modernization scenarios, but rather a solid tool that can be adapted, extended, and improved by the community. I invite developers, architects, and organizations to experiment, contribute, and help evolve the project.&lt;/p&gt;




&lt;h2&gt;
  
  
  References
&lt;/h2&gt;

&lt;p&gt;AHO, A. V.; LAM, M. S.; SETHI, R.; ULLMAN, J. D. &lt;strong&gt;Compilers: Principles, Techniques, and Tools&lt;/strong&gt;. 2nd ed. Boston: Pearson, 2006.&lt;/p&gt;

&lt;p&gt;COMELLA-DORDA, S.; WALLNAU, K.; SEACORD, R.; ROBERT, J. &lt;strong&gt;A Survey of Legacy System Modernization Approaches&lt;/strong&gt;. Pittsburgh: Carnegie Mellon University, Software Engineering Institute, 2000.&lt;/p&gt;

&lt;p&gt;FOWLER, M. &lt;strong&gt;Refactoring: Improving the Design of Existing Code&lt;/strong&gt;. 2nd ed. Boston: Addison-Wesley, 2018.&lt;/p&gt;

&lt;p&gt;FOUR JS DEVELOPMENT TOOLS. &lt;strong&gt;Genero Business Development Language Documentation&lt;/strong&gt;. Four Js, 2024. Available at: &lt;a href="https://4js.com/documentation/" rel="noopener noreferrer"&gt;https://4js.com/documentation/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;IBM CORPORATION. &lt;strong&gt;IBM Informix 4GL Reference Manual&lt;/strong&gt;. IBM, 2020. Available at: &lt;a href="https://www.ibm.com/docs/en/informix-servers" rel="noopener noreferrer"&gt;https://www.ibm.com/docs/en/informix-servers&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;NYSTROM, R. &lt;strong&gt;Crafting Interpreters&lt;/strong&gt;. Genever Benning, 2021. Available at: &lt;a href="https://craftinginterpreters.com/" rel="noopener noreferrer"&gt;https://craftinginterpreters.com/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;QUERIX LTD. &lt;strong&gt;Lycia Documentation&lt;/strong&gt;. Querix, 2024. Available at: &lt;a href="https://querix.com/lycia/" rel="noopener noreferrer"&gt;https://querix.com/lycia/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;SEACORD, R. C.; PLAKOSH, D.; LEWIS, G. A. &lt;strong&gt;Modernizing Legacy Systems: Software Technologies, Engineering Processes, and Business Practices&lt;/strong&gt;. Boston: Addison-Wesley, 2003.&lt;/p&gt;

&lt;p&gt;SOMMERVILLE, I. &lt;strong&gt;Software Engineering&lt;/strong&gt;. 10th ed. Boston: Pearson, 2016.&lt;/p&gt;

&lt;p&gt;WATERS, R. C. &lt;strong&gt;Program Translation via Abstraction and Reimplementation&lt;/strong&gt;. IEEE Transactions on Software Engineering, v. 14, n. 8, p. 1207-1228, 1988.&lt;/p&gt;




</description>
      <category>opensource</category>
      <category>programming</category>
      <category>python</category>
      <category>tooling</category>
    </item>
    <item>
      <title>Introducing WBORM: A lightweight ORM with automatic introspection for JDBC databases 🧩</title>
      <dc:creator>Wanderson Batista</dc:creator>
      <pubDate>Sat, 05 Apr 2025 20:31:45 +0000</pubDate>
      <link>https://dev.to/wanderbatistaf/introducing-wborm-a-lightweight-orm-with-automatic-introspection-for-jdbc-databases-13h</link>
      <guid>https://dev.to/wanderbatistaf/introducing-wborm-a-lightweight-orm-with-automatic-introspection-for-jdbc-databases-13h</guid>
      <description>&lt;p&gt;While support for modern databases is growing in the Python ecosystem, it is still common to face challenges when integrating with legacy systems like Informix, DB2, or Firebird. &lt;strong&gt;WBORM&lt;/strong&gt; was created with that in mind: a lightweight, secure, and automated ORM for developers who want productivity without sacrificing clarity.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;WBORM is designed to work seamlessly with &lt;a href="https://pypi.org/project/wbjdbc/" rel="noopener noreferrer"&gt;wbjdbc&lt;/a&gt;, which handles JVM initialization and JDBC connections to databases like Informix.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  Key Features
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Automatic introspection&lt;/strong&gt;: generate Python models from real tables using &lt;code&gt;generate_model()&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Powerful queries&lt;/strong&gt;: full support for &lt;code&gt;filter&lt;/code&gt;, &lt;code&gt;filter_in&lt;/code&gt;, &lt;code&gt;not_in&lt;/code&gt;, &lt;code&gt;group_by&lt;/code&gt;, &lt;code&gt;having&lt;/code&gt;, &lt;code&gt;joins&lt;/code&gt; (automatic or manual), &lt;code&gt;distinct()&lt;/code&gt; and subqueries&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Built-in safety&lt;/strong&gt;: updates and deletes require both &lt;code&gt;confirm=True&lt;/code&gt; and explicit &lt;code&gt;where&lt;/code&gt; clause&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Lightweight hooks&lt;/strong&gt;: &lt;code&gt;before_add&lt;/code&gt;, &lt;code&gt;after_update&lt;/code&gt;, &lt;code&gt;validate()&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Optional caching&lt;/strong&gt; for introspection and lazy-loaded relationships&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Data export&lt;/strong&gt; as dictionary, JSON, or formatted table via &lt;code&gt;tabulate&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Eager and lazy loading&lt;/strong&gt; using &lt;code&gt;.preload('relation')&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Why WBORM was created
&lt;/h2&gt;

&lt;p&gt;Popular ORMs like SQLAlchemy and Django ORM work great for modern SQL databases, but they tend to be complex or incompatible with JDBC and legacy systems.&lt;/p&gt;

&lt;p&gt;WBORM offers a simple and direct solution focused on what matters:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Interact with databases via JDBC (using &lt;code&gt;wbjdbc&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;No heavy frameworks or migration layers&lt;/li&gt;
&lt;li&gt;Reflect the real database schema, allowing safe and dynamic model mapping&lt;/li&gt;
&lt;li&gt;Easy to learn and highly productive&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Installation
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pip &lt;span class="nb"&gt;install &lt;/span&gt;wborm wbjdbc
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Quick Example
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;wborm&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;generate_model&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;wbjdbc&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;connect_to_db&lt;/span&gt;

&lt;span class="n"&gt;conn&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;connect_to_db&lt;/span&gt;&lt;span class="p"&gt;(...)&lt;/span&gt;
&lt;span class="n"&gt;Cliente&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;generate_model&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;clientes&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;conn&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;clientes&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;Cliente&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;filter&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;ativo&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="bp"&gt;True&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;order_by&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;nome&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;all&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;c&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;clientes&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;c&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;show&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Expected Output:
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;+----+--------------+--------+
| id | nome         | ativo  |
+====+==============+========+
| 1  | Ana Martins  | True   |
+----+--------------+--------+
| 2  | João Rocha   | True   |
+----+--------------+--------+
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Learn More
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Repository&lt;/strong&gt;: &lt;a href="https://github.com/wanderbatistaf/wborm" rel="noopener noreferrer"&gt;github.com/wanderbatistaf/wborm&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Documentation&lt;/strong&gt;: &lt;a href="https://wanderbatistaf.github.io/wborm" rel="noopener noreferrer"&gt;wanderbatistaf.github.io/wborm&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Related project&lt;/strong&gt;: &lt;a href="https://pypi.org/project/wbjdbc/" rel="noopener noreferrer"&gt;wbjdbc on PyPI&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;If you work with legacy databases and need a safe, introspective, and productive way to manage your data using Python, give WBORM a try. Feedback and contributions are very welcome.&lt;/p&gt;




</description>
      <category>python</category>
      <category>informix</category>
      <category>jdbc</category>
      <category>opensource</category>
    </item>
    <item>
      <title>How wbjdbc(v1.1.3) is Revolutionizing Python and Informix Connection</title>
      <dc:creator>Wanderson Batista</dc:creator>
      <pubDate>Wed, 02 Apr 2025 13:38:54 +0000</pubDate>
      <link>https://dev.to/wanderbatistaf/how-wbjdbcv113-is-revolutionizing-python-and-informix-connection-5a30</link>
      <guid>https://dev.to/wanderbatistaf/how-wbjdbcv113-is-revolutionizing-python-and-informix-connection-5a30</guid>
      <description>&lt;p&gt;Integrating Python with databases that require JDBC drivers, such as Informix, can be a challenge. Unlike databases with native Python connectors, JDBC-based connections often require complex configurations and a deep understanding of JVM, JDBC drivers, and connection libraries. &lt;/p&gt;

&lt;p&gt;This is where &lt;strong&gt;&lt;code&gt;wbjdbc&lt;/code&gt;&lt;/strong&gt; comes in — a library designed to simplify this process, abstracting complexities and making the connection fast and efficient.&lt;/p&gt;

&lt;p&gt;With the release of its new version, &lt;code&gt;wbjdbc&lt;/code&gt; introduces features that make developers' lives even easier. Let's explore these new features and understand how they can positively impact your workflow.&lt;/p&gt;




&lt;h3&gt;
  
  
  🚀 Key Improvements in the New Version (v1.1.3)
&lt;/h3&gt;

&lt;h4&gt;
  
  
  ✅ Automatic JVM Initialization
&lt;/h4&gt;

&lt;p&gt;One of the biggest challenges when using JDBC in Python is the need to manually configure the JVM. Now, &lt;code&gt;wbjdbc&lt;/code&gt; automatically detects and initializes the JVM, eliminating the need for manual adjustments in the development environment.&lt;/p&gt;

&lt;h4&gt;
  
  
  ✅ Enhanced Support for Informix and MongoDB
&lt;/h4&gt;

&lt;p&gt;The new version expands its compatibility, allowing connections not only with &lt;strong&gt;Informix&lt;/strong&gt; but also with &lt;strong&gt;MongoDB&lt;/strong&gt;. This broadens the range of applications and reduces the need for specific configurations for each database.&lt;/p&gt;

&lt;h4&gt;
  
  
  ✅ Dependency and JDBC Driver Management
&lt;/h4&gt;

&lt;p&gt;Now, the library takes care of pre-compiling dependencies, ensuring that the correct JDBC drivers are used without requiring developers to manually download or configure &lt;code&gt;.jar&lt;/code&gt; files.&lt;/p&gt;

&lt;h4&gt;
  
  
  ✅ Simplified Connection with Informix
&lt;/h4&gt;

&lt;p&gt;&lt;code&gt;wbjdbc&lt;/code&gt; now allows a more intuitive connection setup, reducing complexity in defining necessary parameters. The new format facilitates connection initialization with Informix databases in a direct and efficient way.&lt;/p&gt;




&lt;h2&gt;
  
  
  Example of a Connection to Informix
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;wbjdbc&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;connect_to_db&lt;/span&gt;

&lt;span class="c1"&gt;# Connection parameters
&lt;/span&gt;&lt;span class="n"&gt;conn&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;connect_to_db&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;db_type&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;  &lt;span class="c1"&gt;# Accepts both strings and numbers to define the database type
&lt;/span&gt;    &lt;span class="n"&gt;host&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;my-server&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;database&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;my_database&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;user&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;my_user&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;password&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;my_password&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;port&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;1526&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;server&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;my_informix_server&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="c1"&gt;# Checking the connection
&lt;/span&gt;&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;conn&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;✅ Connection successfully established!&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;else&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;❌ Failed to connect to the database.&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Supported parameters:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;db_type&lt;/code&gt;: Database type. Accepts numbers or strings:

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;1&lt;/code&gt; or &lt;code&gt;"informix-sqli"&lt;/code&gt; (Informix)&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;2&lt;/code&gt; or &lt;code&gt;"mysql"&lt;/code&gt; (MySQL)&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;3&lt;/code&gt; or &lt;code&gt;"postgresql"&lt;/code&gt; (PostgreSQL)&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;
&lt;code&gt;host&lt;/code&gt;: Database server address.&lt;/li&gt;

&lt;li&gt;
&lt;code&gt;database&lt;/code&gt;: Database name.&lt;/li&gt;

&lt;li&gt;
&lt;code&gt;user&lt;/code&gt;: Username.&lt;/li&gt;

&lt;li&gt;
&lt;code&gt;password&lt;/code&gt;: Access password.&lt;/li&gt;

&lt;li&gt;
&lt;code&gt;port&lt;/code&gt;: Optional port (default varies by database type).&lt;/li&gt;

&lt;li&gt;
&lt;code&gt;server&lt;/code&gt;: Server name for Informix databases.&lt;/li&gt;

&lt;li&gt;
&lt;code&gt;extra_jars&lt;/code&gt;: List of additional JAR files if needed.&lt;/li&gt;

&lt;li&gt;
&lt;code&gt;java_home&lt;/code&gt;: Alternative JAVA_HOME path (optional).&lt;/li&gt;

&lt;li&gt;
&lt;code&gt;debug&lt;/code&gt;: Enables detailed debug logs in the console.&lt;/li&gt;

&lt;li&gt;
&lt;code&gt;return&lt;/code&gt;: Active connection via JDBC or &lt;code&gt;None&lt;/code&gt; if the connection fails.&lt;/li&gt;

&lt;/ul&gt;




&lt;h2&gt;
  
  
  ✅ New &lt;code&gt;fetchdh()&lt;/code&gt; Function: Structured Data Retrieval
&lt;/h2&gt;

&lt;p&gt;Traditionally, executing SQL queries in Python using JDBC libraries returns data in lists of tuples, requiring developers to manually convert the results into a more readable format.&lt;/p&gt;

&lt;p&gt;To solve this, &lt;code&gt;wbjdbc&lt;/code&gt; introduces the &lt;strong&gt;&lt;code&gt;fetchdh()&lt;/code&gt;&lt;/strong&gt; function, which returns results as dictionaries, where keys correspond to column names.&lt;/p&gt;

&lt;h3&gt;
  
  
  Before (using &lt;code&gt;fetchall()&lt;/code&gt;):
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;cursor&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;execute&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;SELECT id, name, age FROM customers&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;data&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;cursor&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;fetchall&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;data&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# Output: [(1, 'John', 30), (2, 'Mary', 25)]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Now, with &lt;code&gt;fetchdh()&lt;/code&gt;:
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;cursor&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;execute&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;SELECT id, name, age FROM customers&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;data&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;cursor&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;fetchdh&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;data&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# Output: [{'id': 1, 'name': 'John', 'age': 30}, {'id': 2, 'name': 'Mary', 'age': 25}]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This approach simplifies data handling in Python, making the code &lt;strong&gt;cleaner and more intuitive&lt;/strong&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  🎯 Practical Applications
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Ideal for &lt;strong&gt;legacy systems&lt;/strong&gt; using Informix needing Python access without major rewrites.&lt;/li&gt;
&lt;li&gt;Supports &lt;strong&gt;MongoDB&lt;/strong&gt; for NoSQL storage via JDBC.&lt;/li&gt;
&lt;li&gt;Saves setup time and reduces technical friction in &lt;strong&gt;data integration pipelines&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  📌 Conclusion
&lt;/h2&gt;

&lt;p&gt;The new version of &lt;code&gt;wbjdbc&lt;/code&gt; removes technical barriers and reduces the time needed to configure JDBC connections in Python. Whether accessing &lt;strong&gt;Informix&lt;/strong&gt;, &lt;strong&gt;MongoDB&lt;/strong&gt;, or &lt;strong&gt;PostgreSQL&lt;/strong&gt;, the library simplifies the process and enhances the developer experience.&lt;/p&gt;




&lt;p&gt;If you work with data integration and want to test these new features, visit the official PyPI page:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://pypi.org/project/wbjdbc/" rel="noopener noreferrer"&gt;PyPI - wbjdbc&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Made with ❤️ 🇧🇷&lt;/em&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Simplify Python-Informix Connections with wbjdbc</title>
      <dc:creator>Wanderson Batista</dc:creator>
      <pubDate>Tue, 14 Jan 2025 16:08:11 +0000</pubDate>
      <link>https://dev.to/wanderbatistaf/simplify-python-informix-connections-with-wbjdbc-3l9b</link>
      <guid>https://dev.to/wanderbatistaf/simplify-python-informix-connections-with-wbjdbc-3l9b</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;Managing JDBC connections and JVM setup for Python applications can be tedious, especially when working with databases like Informix. Enter &lt;strong&gt;wbjdbc&lt;/strong&gt; a Python library designed to simplify these tasks, automate the environment configuration, and allow you to focus on what matters: interacting with your data.&lt;/p&gt;

&lt;p&gt;This article walks you through the key features of wbjdbc, including how to automate connection setups, and provides practical examples for automating routine tasks.&lt;/p&gt;




&lt;h2&gt;
  
  
  What is wbjdbc?
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;wbjdbc&lt;/strong&gt; is a Python library that streamlines JDBC and JVM setup, making it easy to connect to databases like Informix. Key features include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Simplified JVM initialization&lt;/strong&gt;: Automates JVM setup, including locating and loading &lt;code&gt;jvm.dll&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Built-in JDBC driver support&lt;/strong&gt;:

&lt;ul&gt;
&lt;li&gt;Informix JDBC Driver (&lt;code&gt;jdbc-4.50.10.1.jar&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;MongoDB BSON Driver (&lt;code&gt;bson-3.8.0.jar&lt;/code&gt;)&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;strong&gt;Precompiled dependencies&lt;/strong&gt;: Ensures compatibility and avoids common pitfalls.&lt;/li&gt;

&lt;li&gt;

&lt;strong&gt;Lightweight and easy to install&lt;/strong&gt;.&lt;/li&gt;

&lt;/ul&gt;




&lt;h2&gt;
  
  
  Installation
&lt;/h2&gt;

&lt;p&gt;To get started, install wbjdbc via pip:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pip &lt;span class="nb"&gt;install &lt;/span&gt;wbjdbc
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Automating Informix Database Connection
&lt;/h2&gt;

&lt;p&gt;Here’s a simple automation example that uses wbjdbc to connect to an Informix database and execute a query.&lt;/p&gt;

&lt;h3&gt;
  
  
  Example: Automating a Data Retrieval Task
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;wbjdbc&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;start_jvm&lt;/span&gt;
&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;jaydebeapi&lt;/span&gt;

&lt;span class="c1"&gt;# Initialize the JVM
&lt;/span&gt;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;initialize_environment&lt;/span&gt;&lt;span class="p"&gt;():&lt;/span&gt;
    &lt;span class="nf"&gt;start_jvm&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
    &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;JVM initialized and drivers loaded.&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="c1"&gt;# Connect to the database
&lt;/span&gt;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;connect_to_informix&lt;/span&gt;&lt;span class="p"&gt;():&lt;/span&gt;
    &lt;span class="n"&gt;jdbc_url&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;jdbc:informix-sqli://&amp;lt;HOST&amp;gt;:&amp;lt;PORT&amp;gt;/&amp;lt;DATABASE&amp;gt;:INFORMIXSERVER=&amp;lt;SERVER_NAME&amp;gt;&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
    &lt;span class="n"&gt;user&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;your_username&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
    &lt;span class="n"&gt;password&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;your_password&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;

    &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Establishing database connection...&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;conn&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;jaydebeapi&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;connect&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;com.informix.jdbc.IfxDriver&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;jdbc_url&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;user&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;password&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;
    &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Connection successful.&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;conn&lt;/span&gt;

&lt;span class="c1"&gt;# Automate a query task
&lt;/span&gt;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;automate_query&lt;/span&gt;&lt;span class="p"&gt;():&lt;/span&gt;
    &lt;span class="n"&gt;conn&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;connect_to_informix&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
    &lt;span class="n"&gt;cursor&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;conn&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;cursor&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;

    &lt;span class="k"&gt;try&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="n"&gt;query&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;SELECT * FROM customer WHERE active = 1&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
        &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Executing query:&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;query&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="n"&gt;cursor&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;execute&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;query&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="n"&gt;results&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;cursor&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;fetchall&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;

        &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Results:&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;row&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;results&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
            &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;row&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="k"&gt;finally&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="n"&gt;cursor&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;close&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
        &lt;span class="n"&gt;conn&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;close&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
        &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Database connection closed.&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="c1"&gt;# Main automation workflow
&lt;/span&gt;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;main&lt;/span&gt;&lt;span class="p"&gt;():&lt;/span&gt;
    &lt;span class="nf"&gt;initialize_environment&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
    &lt;span class="nf"&gt;automate_query&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;

&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;__name__&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;__main__&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="nf"&gt;main&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Key Points
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;JVM Initialization&lt;/strong&gt;: &lt;code&gt;start_jvm()&lt;/code&gt; ensures that the JVM and drivers are correctly set up.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Connection Automation&lt;/strong&gt;: Abstracts the complexities of configuring JDBC URLs and credentials.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Query Execution&lt;/strong&gt;: Automates routine queries, making it easy to retrieve and process data programmatically.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Why wbjdbc?
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Time-saving&lt;/strong&gt;: Eliminates manual setup and reduces boilerplate code.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Error reduction&lt;/strong&gt;: Precompiled drivers minimize compatibility issues.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Focus on automation&lt;/strong&gt;: Ideal for tasks requiring frequent database interactions.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;wbjdbc transforms the way Python developers interact with Informix databases, automating tedious setup processes and enabling efficient data operations. Whether you’re running simple queries or building complex workflows, wbjdbc has you covered.&lt;/p&gt;

&lt;p&gt;Ready to simplify your Informix database workflows? Install wbjdbc today and start automating your database tasks!&lt;/p&gt;




&lt;h2&gt;
  
  
  Resources
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://pypi.org/project/wbjdbc/" rel="noopener noreferrer"&gt;wbjdbc on PyPI&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/wanderbatistaf/wbjdbc" rel="noopener noreferrer"&gt;wbjdbc on GitHub&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Feedback or questions?&lt;/strong&gt; Share your thoughts in the comments below!&lt;/p&gt;

</description>
      <category>python</category>
      <category>database</category>
      <category>informix</category>
      <category>jdbc</category>
    </item>
  </channel>
</rss>
