发布新帖

查找

文章
· 14 hr 前 阅读大约需 5 分钟

Vibecoding Full Stack Applications With IRIS Backend in January 2026

How I Vibecoded a Backend (and Frontend) on InterSystems IRIS

I wanted to try vibecoding a real backend + frontend setup on InterSystems IRIS, ideally using something realistic rather than a toy example. The goal was simple: take an existing, well-known persistent package in IRIS and quickly build a usable UI and API around it — letting AI handle as much of the boilerplate as possible. Here is the result of the experiments.

Choosing the Data Model

For this experiment, I picked the Samples BI Demo. It’s good for vibecoding:

  • Contains several well-designed persistent classes
  • It’s widely known and easy to install
  • It already works nicely with IRIS BI

Installation is trivial using IPM:

zpm "install samples-bi-demo"

Once installed, I verified that everything worked correctly in IRIS BI. For convenience and a better browsing experience, I also installed DSW (DeepSee Web). and made sure that data is there and all works perfectly - here is the screenshot of installed data viwed by DSW:

Sampels Bi Demo shows the sales of an imaginary company HoleFoods that produces and sells products with Holes. The setup goes with HoleFoods package of persistent classes:

  • Product
  • Outlet
  • Country
  • Region
  • Transaction

Quite a match for a CRUD demo.

Vibecoding Setup

Here is my "vibecoding with IRIS" setup:

That’s it. No heavy scaffolding, no custom frameworks.

The UI Recipe

The architecture I followed is straightforward and repeatable:

  1. A frontend UI
  2. Communicating with IRIS via a REST API
  3. Defined by a Swagger (OpenAPI) specification
  4. Implemented natively in InterSystems IRIS ObjectScript and IRIS SQL.

Generating the Swagger API

In this approach, OpenAPI spec or Swagger is the middleman that both the frontend UI and IRIS understand. IRIS 2025.3 supports Swagger / OpenAPI 2.0 so I asked Codex to generate a CRUD-style API for one of the persistent classes — starting with Product. To make this easier for the AI, I exported the source code of the persistent classes from my local IRIS instance and shared them with Codex.

I decided to begin with a simple requirement:

A page to create, edit, list, and delete Products

To support this, I asked Codex to:

  • Generate a spec.cls Swagger definition
  • Make Product derive from %JSON.Adaptor
  • Follow the conventions and preferences described in my AGENTS.md file
    (basically accumulated “wisdom” from previous interactions)

I also chose a base API path:

/holefoods/api

Codex generated the class:

Holefoods.api.spec After compiling it, IRIS automatically produced two additional classes:

  • Holefoods.api.disp
    Always generated by IRIS and responsible for endpoint routing and request/response plumbing
  • Holefoods.api.impl
    Where the actual business logic lives - it goes with method stubs initially.

This is one of those IRIS features that feels almost magical when paired with vibecoding. Being thoughtful (or maybe cautious 😄), Codex asked:

  • Whether the web application should be registered in module.xml
  • What dispatch class name should be used

I confirmed both — which means the API is automatically created when IRIS starts - and it added web app setup in module.xml so the web app appears in IRIS with next docker rebuild or manual module load:

<CSPApplication
Url="/holefoods/api"
DispatchClass="HoleFoods.api.disp"
MatchRoles=":{$dbrole}"
PasswordAuthEnabled="0"
UnauthenticatedEnabled="1"
Recurse="1"
UseCookies="2"
CookiePath="/holefoods/api/"
CorsAllowlist="*"
CorsCredentialsAllowed="1"
CorsHeadersList="Content-Type,Authorization,Accept-Language,X-Requested-With,session"
/>

Security Setup

Anyone who has worked with IRIS knows that web applications + security can sometimes be… eventful. So I explicitly asked Codex to generate:

Holefoods.api.security.cls

, following the instructions in AGENTS.md

This class introduced the required security adjustments to enable the API development phase to run smoothly, but also clearly and easily escalatable to any higher security level, mostly focusing on all the security relations to a special role that is given to an application and thus projected to everyone who is logged into this application.

Implementing the API

Next step: implementation.

I asked Codex to fully implement the CRUD logic inside:

Holefoods.api.impl And it just did. At this point, everything was ready to test.

Testing with Swagger UI

To quickly validate the API, I installed Swagger UI:

zpm "install swagger-ui"

Important note (learned the hard way earlier):
Swagger UI requires a _spec endpoint, which must always be implemented in the impl class. Once that’s in place, Swagger UI works perfectly.

After restarting IRIS, I could see the full API definition exposed — and test it interactively.

The request:

GET /holefoods/api/products

returned some meaningful data. At this stage, the backend was essentially “done”.

Vibecoding the Frontend

With a working API and a clean Swagger spec, building the frontend becomes trivial. You have options:

  • Ask Codex to generate the frontend
  • Use tools like Lovable to scaffold a UI directly from the spec

I chose the latter — and within minutes had a working local UI connected to IRIS. After some testing (and fixing a small issue with deletion), the full round-trip experience was there: UI → API → IRIS → persistent storage. Here is the screenshot of the first result (It can be viewed locally at http://localhost:5174/ ):

 

Adding Unit Tests (Because Adults Do That)

The last missing piece was unit testing. I asked Codex to generate:

HoleFoods.api.Unittests.cls

covering all endpoints defined in the Swagger spec.

Once generated, I added the test class to the module configuration so tests could be run via IPM with this line

<UnitTest Name="/tests" Package="HoleFoods.api.tests" Phase="test"/>

so tests can be called as:

zpm "test esh-vibe-back-demo" 

And just like that, all API endpoints were covered and visible in the IRIS unit test portal:

Later I asked to add /transactions endpoint and Codex introduced code into spec class, has built the implementation in impl and introduced unit-tests. And has built a UI the result of which you can see here:

Final Thoughts

InterSystems IRIS + Swagger + vibecoding looks like a powerful and effective combination.

Yes, the result is a prototype —but almost real, and testable, built shockingly fast.

Here is the repository.

Leveraging AGENTS.md and conducting open source examples with best practices on dealing with the IRIS backend can boost the leverage of IRIS as a robust backend for comprehensive full-stack applications.

The coachable code-generation capability of OpenAI Codex or Claude Code opens the opportunity of building superperformant backends on IRIS, as the nature of any SQL on IRIS backend is no other than code generation over the globals traversing. 

P.S.

This article is written by a human and reviewed by AI for better English :)

P.P.S.

And as a bonus track - built the UI on Lovable too - so you can play with the online demo:

讨论 (0)1
登录或注册以继续
文章
· 17 hr 前 阅读大约需 2 分钟

How to customize SQL table and field names of classes in InterSystems IRIS

In InterSystems IRIS, when you compile a persistent class, you automatically get a SQL table. Sometimes, there are situations that require having a slightly (or not so slightly) different names/options in SQL compared to Object model. Here are some of the settings that you can change to make it happen.

Class-level settings 

They define the "Face" of your class when it appears as a table in the SQL catalog.

SqlTableName allows you to change the name of SQL table that holds objects from your class. This is especially useful, when your class name uses reserved SQL words in a name, e.g. Group.

Usage:

Class Banking.Group Extends %Persistent [ SqlTableName = Banking_Group ]
{ 

}

SqlRowIdName allows you to rename the default primary key column to something semantically meaningful. Every persistent class has a unique identifier, and by default it's called ID. Naming it PatientID or OrderID makes it much more readable and prevents naming collisions in complex queries.

Usage:

Class Banking.Account Extends %Persistent [ SqlRowIdName = AccID ]
{
    
}

DdlAllowed allows or prevents the table schema from being changed using SQL. For example, if you are a "Class-first" developer, you don't want a DBA accidentally running ALTER TABLE and desyncing the class definition. Setting this to Not DdlAllowed (default) ensures the Class is the "source of truth." Setting it to DdlAllowed allows standard SQL DDL commands to modify the class.

Usage:

Class Banking.Transaction Extends %Persistent [ DdlAllowed ]
{
    
}
Class Banking.Account Extends %Persistent [ Not DdlAllowed ]
{
    
}

Property-level settings

These parameters change how individual data points (properties) are projected as columns.

SqlFieldName allows to provide a different column name than the property name. 

Usage:

Property CurrentAmount As %Float [ SqlFieldName = Amount ];

SqlListType and SqlListDelimiter allow to define how "List" collections are stored and viewed in SQL. Since SQL is inherently "flat," it struggles with lists. The goal of these settings is to set the storage method that matches your performance needs for "Unnesting" the data in queries. There are several possible values for the SqlListType:

SUBNODE: Stores list items in a separate global, which is more efficient for large lists (like a default for an array).

DELIMITED: Stores items as a single string with delimiters set in SqlListDelimiter 

LIST: Stored items in $List() format in memory and on disk. This is the default.

Usage:

Property Currencies As list Of %String [ SqlListDelimiter = ";", SqlListType = DELIMITED ];

There are several more settings you can configure to change how your SQL data is represented compared to the object model. Go through the documentation to uncver them all!

讨论 (0)2
登录或注册以继续
问题
· 20 hr 前

I am getting ASTM messages in a single line instead of different lines like H|..../rQ|..../rL in the service. How can I resolve it?

I've modified the class file, but messages still arrive as a single line (e.g., "H|.../rQ|.../rL") instead of separate lines in the ASTM service. The <ENQ>..<EOT> header looks correct, logs show no errors, and the service receives messages fine. Is there an Ensemble 2018.1 engine setting (like line terminator handling or TCP framing) to fix the line splitting? ​

1 条新评论
讨论 (1)2
登录或注册以继续
Job
· 21 hr 前

What Is Machine Learning? Simple Explanation for Beginners

 

Machine Learning (ML) is one of the most exciting and important technologies in today’s digital world. It is a major part of Artificial Intelligence (AI) and is used in everything from social media and online shopping to healthcare and self-driving cars. But what exactly is machine learning, and how does it work?

In this beginner-friendly guide, you’ll learn what machine learning is, how it works, its types, real-life examples, benefits, challenges, and why it matters for the future.

What Is Machine Learning?

Machine Learning is a branch of Artificial Intelligence that allows computers to learn from data and improve their performance without being explicitly programmed.

In simple words, instead of telling a computer exactly what to do, we give it data and let it learn patterns from that data.

For example:

  • Email services use machine learning to filter spam messages.
  • Netflix uses machine learning to recommend movies and shows.
  • Banks use machine learning to detect fraud.

How Does Machine Learning Work?

Machine learning works by using data, algorithms, and models.

Data Collection

First, a large amount of data is collected. This data can be text, images, numbers, or videos.

Data Preparation

The data is cleaned and organized. Errors, duplicates, and missing values are removed.

Choosing an Algorithm

An algorithm is selected based on the type of problem. Different algorithms are used for different tasks.

Training the Model

The algorithm is trained using data. During training, the model learns patterns and relationships.

Testing and Prediction

The trained model is tested with new data. If the results are accurate, it can be used to make predictions.

Types of Machine Learning

There are three main types of machine learning:

Supervised Learning

In supervised learning, the model is trained using labeled data.

Examples:

  • Email spam detection
  • Price prediction
  • Image classification

Unsupervised Learning

In unsupervised learning, the model works with unlabeled data and finds hidden patterns.

Examples:

  • Customer segmentation
  • Recommendation systems
  • Data clustering

Reinforcement Learning

In reinforcement learning, the model learns by trial and error.

Examples:

  • Game-playing AI
  • Robotics
  • Self-driving cars

Real-Life Examples of Machine Learning

Machine learning is already part of our daily lives:

  • Social Media: Shows relevant posts and ads.
  • E-commerce: Recommends products.
  • Healthcare: Helps detect diseases.
  • Finance: Identifies fraud.
  • Voice Assistants: Understand speech.

Benefits of Machine Learning

Machine learning offers many advantages:

  • Automates repetitive tasks
  • Improves accuracy
  • Handles large amounts of data
  • Makes better predictions
  • Saves time and money

Challenges and Limitations of Machine Learning

Despite its benefits, machine learning also has challenges:

  • Requires large amounts of data
  • Can be biased
  • Needs high computing power
  • Difficult to explain decisions
  • Expensive to develop

Machine Learning vs Artificial Intelligence

Many beginners confuse machine learning with artificial intelligence.

  • Artificial Intelligence is the broader concept of making machines smart.
  • Machine Learning is a subset of AI that focuses on learning from data.

The Future of Machine Learning

The future of machine learning looks very promising. It will play a major role in:

  • Healthcare
  • Education
  • Business
  • Smart cities
  • Climate research

FAQs:

What is machine learning in simple words?

Machine learning means teaching computers to learn from data and make decisions on their own.

Is machine learning the same as artificial intelligence?

No. Machine learning is a part of artificial intelligence.

Where is machine learning used?

Machine learning is used in social media, healthcare, finance, online shopping, and voice assistants.

Do I need coding to learn machine learning?

Basic programming knowledge is helpful but not always required for beginners.

Is machine learning hard to learn?

It can be challenging at first, but beginners can learn it step by step.

Conclusion:

Machine learning is a powerful technology that allows computers to learn from data and make smart decisions. It is already transforming industries such as healthcare, finance, education, and entertainment. While machine learning offers many benefits like automation and better predictions, it also comes with challenges such as data bias, high costs, and privacy concerns.

For beginners, understanding the basics of machine learning is the first step toward exploring the world of artificial intelligence. As technology continues to evolve, machine learning will become even more important in shaping the future. Learning about machine learning today can help you stay prepared for tomorrow’s opportunities.

To continue learning with simple guides, tutorials, and the latest updates on artificial intelligence and machine learning, explore more content on AI With Arzan and stay connected with a platform dedicated to beginners and tech learners.

讨论 (0)1
登录或注册以继续
文章
· 一月 24 阅读大约需 4 分钟

通过 ODBC 将 C# 连接到 InterSystems IRIS

对于构建外部应用程序的开发人员,尤其是使用C# 等熟悉技术的开发人员来说,ODBC(开放数据库连接)是连接任何关系数据库(包括 InterSystems IRIS)的重要标准化桥梁。虽然 InterSystems 提供了自己的本地 ADO.NET 提供商,但 ODBC 驱动程序通常是与通用数据库工具和框架集成的最直接途径。

以下是使用 ODBC 驱动程序将 C# 应用程序连接到 IRIS 实例的分步指南,重点是无 DSN 连接字符串。

第 1 步:安装 InterSystems IRIS ODBC 驱动程序

在 Windows 机器上安装 InterSystems IRIS 时,默认会安装 InterSystems ODBC 驱动程序。

  • 如果 IRIS 位于同一台计算机上:驱动程序已经存在。
  • 如果 IRIS 位于远程服务器上:如果您是客户机,则必须从 WRC 网站下载并安装适用于客户机操作系统(Windows、Linux 或 macOS)和位元(32 位或 64 位)的独立 ODBC 客户机驱动程序包,或者安装客户机组件并复制 ODBC 驱动程序。

安装完成后,可在 Windows 的ODBC 数据源管理员(ODBC Data Source Administrator)工具中验证其是否存在(查找 InterSystems IRIS ODBC35 驱动程序)。

第 2 步:定义无 DSN 连接字符串

我们不在 Windows 管理员工具中创建预配置的数据源名称 (DSN),而是使用无 DSN 连接字符串。这样更便于部署,因为您的应用程序会携带所有必要的连接详细信息。

该格式指定了驱动程序名称和服务器参数:

Driver={InterSystems IRIS ODBC35};
server=127.0.0.1;
port=1972;
database=USER;
uid=_System

注意

  • 驱动程序名称InterSystems IRIS ODBC35 或有时为 InterSystems ODBC)必须与在本地 ODBC 数据源管理员中注册的名称完全一致。
  • Port 是 IRIS Superserver 端口(通常为 1972)。
  • Database 是 InterSystems IRIS 中的目标命名空间(Namespace)(如 USER 或您的自定义应用程序名称空间)。
  • 默认的 UID_System,密码是 SYS请务必在生产环境中更改这些默认值。

第 3 步:用 C# 实现连接

在 C# 项目中,您需要引用System.Data.Odbc命名空间,以使用通用 .NET ODBC 提供程序。

下面是一个最简单的 C# 示例,用于建立连接、针对默认表执行简单查询并显示结果。

using System.Data;
using System.Data.Odbc;

public class IrisOdbcExample
{
    public static void Main()
    {
        // 1. Define the DSN-less connection string
        string connectionString =
            "DRIVER={InterSystems IRIS ODBC35};" +
            "Server=127.0.0.1;Port=1972;Database=USER;" +
            "UID=_System;PWD=SYS;";

        // 2. Define the SQL Query (Example: querying the default Sample.Person table)
        string sql = "SELECT ID, Name FROM Sample.Person WHERE ID < 5";

        using (OdbcConnection connection = new OdbcConnection(connectionString))
        {
            try
            {
                connection.Open();
                Console.WriteLine("Connection successful!");

                using (OdbcCommand command = new OdbcCommand(sql, connection))
                using (OdbcDataReader reader = command.ExecuteReader())
                {
                    while (reader.Read())
                    {
                        Console.WriteLine($"ID: {reader["ID"]}, Name: {reader["Name"]}");
                    }
                }
            }
            catch (OdbcException ex)
            {
                // 3. Handle specific ODBC errors (e.g., wrong password, port blocked)
                Console.WriteLine($"ODBC Error: {ex.Message}");
            }
            catch (Exception ex)
            {
                Console.WriteLine($"General Error: {ex.Message}");
            }
            // The connection is automatically closed at
            // the end of the Using block.
        }
    }
}
 
设置 DSN

下一步

这种无 DSN 的方法提供了灵活性,并避免了客户端配置的臃肿。对于高性能的 C# 应用程序,您可以考虑使用本地InterSystems ADO.NET Provider,但对于快速集成和工具兼容性,ODBC 连接是一个可靠的选择。

❗始终记住在生产代码中使用参数化查询,以防止 SQL 注入漏洞。

讨论 (0)1
登录或注册以继续