Join us for a technical walkthrough of the redesigned user interface and key enhancements from recent releases. Get updated with the latest in Health Connect and IRIS, see how the updates streamline workflows, and learn what’s under the hood.
Presenter: @Keren Skubach, Sales Engineer InterSystems Israel
Al observar la avalancha de herramientas de desarrollo impulsadas por IA y al estilo vibe coding que han estado apareciendo últimamente casi cada mes, con funciones cada vez más emocionantes, me preguntaba si sería posible aprovecharlas con InterSystems IRIS. Al menos para construir un frontend. Y la respuesta es: ¡sí! Al menos con el enfoque que seguí en este ejemplo.
Aquí tenéis mi receta para crear la interfaz de usuario mediante prompts frente al backend de InterSystems IRIS:
Tened una API REST en el lado de IRIS, que refleje una especificación Open API (swagger).
Generad la interfaz de usuario con cualquier herramienta de vibe coding (por ejemplo, Lovable) y apuntad la interfaz al endpoint de la API REST.
¡Y listo!
Aquí tenéis el resultado de mi propio experimento: una interfaz 100 % generada por prompts frente a la API REST de IRIS, que permite listar, crear, actualizar y eliminar entradas de una clase persistente (Open Exchange, código del frontend, vídeo).
¿Cómo es la receta en detalle?
¿Cómo obtener la especificación Open API (Swagger) frente al backend de IRIS?
Tomé como plantilla la clase persistente dc.Person, que contiene algunos campos simples: Nombre, Apellido, Empresa, Edad, etc.
Pensé que podría utilizar ChatGPT para generar la especificación Swagger, pero creo que se volvería un poco tímido si le paso directamente ObjectScript, así que generé la DDLcorrespondiente a la clase desde el terminal:
Please create an Open API spec in JSON version 2.0 vs the following DDL which will allow to get all the entries and individual ones, create, update, delete entries. Also, add _spec endpoint with OperationId GetSpec. Please provide meaningful operation id's for all the endpoints. The DDL: CREATE TABLE dc_Sample.Person( %PUBLICROWID, Company VARCHAR(50), DOB DATE, Name VARCHAR(-1), Phone VARCHAR(-1), Title VARCHAR(50) ) GO CREATE INDEX DOBIndex ON dc_Sample.Person(DOB) GO
Y funcionó bastante bien: aquí tenéis el resultado.
Después, usé la herramienta de línea de comandos %REST para generar las clases del backend REST.
Tras eso, implementé la lógica REST de IRIS con ObjectScript para las llamadas GET, PUT, POST y DELETE openexchange.intersystems.com/package/iris-web-swagger-ui. Casi todo lo hice a mano ;) con algo de ayuda del Co-pilot en VSCode.
Probé la API REST manualmente con Swagger-UI y, cuando todo estuvo listo, comencé a construir la interfaz de usuario.
La interfaz de usuario fue generada mediante prompts usando la herramienta Lovable.dev, a la que le pasé el siguiente prompt:
Please create a modern, convenient UI vs. the following open API spec, which will allow list, create, update, and delete persons { "swagger": "2.0", "info": { "title": "Person API", "version": "1.0.0" }, ...
(...) el promt seguía con toda la especificación Swagger.
Una vez que la interfaz fue construida y probada manualmente, le pedí a Lovable que la conectara con el endpoint REST API en IRIS. Primero lo hice localmente en Docker y, tras algunas pruebas y correcciones de errores (también vía prompts), desplegué el resultado final.
Algunos detalles y lecciones aprendidas:
La seguridad de la API REST en el lado de IRIS no siempre es evidente desde el inicio, en especial por temas relacionados con CORS. Por ejemplo, tuve que añadir una clase especial cors.cls y modificar manualmente la especificación Swagger para que CORS funcionara correctamente.
La documentación Swagger no funciona automáticamente en Docker con IRIS, pero se puede solucionar creando un endpoint especial _spec y añadiendo unas líneas de código en ObjectScript.
La especificación Swagger para IRIS debe ser la versión 2.0, no la 3.1 ni la más reciente.
En resumen:
Este enfoque resulta ser una forma bastante efectiva para que un desarrollador backend en IRIS construya prototipos completos de aplicaciones full-stack en muy poco tiempo y sin necesidad de conocimientos previos de desarrollo frontend.
Contadme qué opináis. ¿Y cuál ha sido vuestra experiencia vibe coding con IRIS?
An experienced jury from InterSystems will choose the best apps to nominate for the prizes in the Experts Nomination.
Community nomination:
All active members of the Developer Community with a “trusted” status in their profile are eligible to vote in the Community nomination.
Blind vote!
The number of votes for each app will be hidden from everyone. We will publish the leaderboard in the comments to this post once a day.
The order of projects on the contest page will be as follows: the earlier an application was submitted to the competition, the higher it will be on the list.
P.S. Don't forget to subscribe to this post (click on the bell icon) to be notified of new comments.
To take part in the voting, you need:
Sign in to Open Exchange – DC credentials will work.
Make any valid contribution to the Developer Community – answer or ask questions, write an article, contribute applications on Open Exchange – and you'll be able to vote. Check this post on the options to make helpful contributions to the Developer Community.
If you change your mind, cancel the choice and give your vote to another application!
Note: contest participants are allowed to fix the bugs and make improvements to their applications during the voting week, so don't miss and subscribe to application releases!
If one of your packages on OEX receives a review you get notified by OEX only of YOUR own package. The rating reflects the experience of the reviewer with the status found at the time of review. It is kind of a snapshot and might have changed meanwhile. Reviews by other members of the community are marked by * in the last column.
I also placed a bunch of Pull Requests on GitHub when I found a problem I could fix. Some were accepted and merged, and some were just ignored. So if you made a major change and expect a changed review just let me know.