Home Applications deployed-code-template


This application is not supported by InterSystems Corporation. Please be notified that you use it at your own risk.
2 reviews
IPM installs
Pull requests
An example of how to deploy ObjectScript without source via IPM

What's new in this version

typo fix


This is an example and template to create InterSystems package manager modules in deployed mode - without source code.

Learn more on deployed mode here.

Try Deployed Package

Open IRIS terminal and install:

USER>zpm “install deployed-oscript-template”
Module will install two classes:
dc.deployed.ObjectScript and dc.withsource.ObjectScript

To test them run:

Do ##class(dc.deployed.ObjectScript).Test()

and then

Do ##class(dc.withsource.ObjectScript).Test()

you can check the source code with the following commands:
first deploed mode:

k text do ##class(%Compiler.UDL.TextServices).GetTextAsString($namespace, "dc.deployed.ObjectScript", .text) w text

and with source code:

k text do ##class(%Compiler.UDL.TextServices).GetTextAsString($namespace, "dc.withsource.ObjectScript", .text) w text

But if you check the source code you’ll see it only for dc.withsource.ObjectScript, whereas dc.deployed.ObjectScript will contain only the signatures of class and methods.

How It Works?

To make class package or a particlular class being published in registry as deployed include Deploy=“true” element in a resource. See the module.xml as an example.

So when you will publish the package it will be published in a deployed mode.

what is the idea?

The idea is to be able working with a source code in your repository and publish packages for commercial usage without source code in a deployed mode.
This template illustrates the approach.

When you use load command e.g. to load package into IRIS it loads it with source code. So publish and install command work with a deployed mode.

The workflow looks as following:

  1. use load command to import source code into the development environment
  2. use publish command once module is ready for release to be published in a deployed mode.
  3. users install module without source code using install command.

Development environment


Make sure you have git and Docker desktop installed.

How to develop with template

Clone/git pull the repo into any local directory

$ git clone https://github.com/intersystems-community/objectscript-docker-template.git

Open the terminal in this directory and run:

$ docker-compose build
  1. Run the IRIS container with your project:
$ docker-compose up -d

Click on InterSystems Menu in the bottombar and choose Refresh Connection to connect VS-Code to a running IRIS instance

How to Test it

Open IRIS terminal:

$ docker-compose exec iris iris session iris
write ##class(dc.deployed.ObjectScript).Test()

How to start coding

This repository is ready to code in VSCode with ObjectScript plugin.
Install VSCode, Docker and ObjectScript plugin and open the folder in VSCode.
Open /src/cls/PackageSample/ObjectScript.cls class and try to make changes - it will be compiled in running IRIS docker container.

Read more
Made with
zpm install deployed-oscript-template download archive
1.0.122 Apr, 2024
ObjectScript quality test
Developer Environment
Works with
InterSystems IRISInterSystems IRIS for Health
First published
21 Apr, 2024