Hi Developers!

Suppose you have a persistent class with data and you want to have a simple Angular UI for it to view the data and make CRUD operations.

Recently @Alberto Fuentes described how to build Angular UI for your InterSystems IRIS application using RESTForms2.

In this article, I want to tell you how you can get a simple Angular UI to CRUD and view your InterSystems IRIS class data automatically in less than 5 minutes.

Let's go!

7 3
4 991

Hi Devs!

Last weekend I had been testing the newborn csvgen module and was looking for a CSV file to test - thus I came across an interesting datafile on Data.World with Game of Throne episodes statistics. Death statistics. These folks documented all the murders through all the 8 seasons and noted where, who, from what clan with what weapon had killed another one.

So I imported it and made an IRIS Analytics dashboard.

You Know Nothing, Jon Snow | You Know Nothing, Jon Snow | Know ...

Don't worry, Jon, with this dashboard we can figure out something ). See the details below.

6 0
2 557

Hi Developers!

Sometimes we need to import CSV data programmatically to InterSystems IRIS either from CSV or from URL. And we expect the class with proper datatypes to be created and the data to be imported.

I published a module csvgen on Open Exchange which does exactly that.

If you just need the CSV file be imported into IRIS you can do the following:

USER>do ##class(community.csvgen).Generate("/usr/data/titanic.csv",,"Data.Titanic")

Class name: Data.Titanic
Header: PassengerId INTEGER,Survived INTEGER,Pclass INTEGER,Name VARCHAR(250),Sex VARCHAR(250),Age INTEGER,SibSp INTEGER,Parch INTEGER,Ticket VARCHAR(250),Fare MONEY,Cabin VARCHAR(250),Embarked VARCHAR(250)
Records imported: 891
USER>

Or if you have the CSV on the internet, e.g. COVID-19 Data on Github you can get the data in the following way:

USER>d ##class(community.csvgen).GenerateFromURL("https://raw.githubusercontent.com/CSSEGISandData/COVID-19/master/csse_covid_19_data/csse_covid_19_daily_reports/05-29-2020.csv",",","Data.Covid19")

Class name: Data.Covid19
Header: FIPS INTEGER,Admin2 VARCHAR(250),Province_State VARCHAR(250),Country_Region VARCHAR(250),Last_Update DATE,Lat MONEY,Long_ DOUBLE,Confirmed INTEGER,Deaths INTEGER,Recovered INTEGER,Active INTEGER,Combined_Key VARCHAR(250),Incidence_Rate DOUBLE,Case-Fatality_Ratio DOUBLE
Records imported: 3522
USER>

7 16
1 1.1K

Hi ObjectScript developers!

How to Protect Your Belongings from Pests While Moving - Delicate ...

InterSystems ObjectScript is perhaps the best language on the planet to deal with globals - and it is an interpretable language.

Yes, it has a compiler. But even the compiler can compile some lines in ObjectScript which will then fire as bugs during the runtime.

There are some technics on how to avoid that such as unit testing, coding guidelines and your coding experience, of course ;)

Here I want to present to you the yet another approach to how you can reduce the number of errors in your ObjectScript runtime and enforce coding guidelines - it's an ObjectScript Quality tool developed by Lite Solutions, InterSystems solution partner.

See the details below.

4 0
0 411
Article
· May 7, 2020 4m read
Unit Testing with ZPM

Hi Developers!

I want to share with you the approach you can use working with Unit Testing which I personally find very convenient and robust.

Will not talk much here about Unit Testing, we have documentation, enough good articles on the topic not only on the Internet but here on Developers Community too, e.g. this one.

How can you manage the Unit Testing of your ZPM module?

This is pretty handy with ZPM. It has a special command "test" which runs all the tests you mentioned in the module. You can execute it as shown below:

zpm:USER>module-name test

And this command runs all the tests you mentioned in module.xml.

Let's see how it works.

6 5
3 568

Now the Classes/Rutines/DeepSee files will be automatically exported to the working directory after saving or compiling and files will be automatically deleted .

https://www.youtube.com/embed/B1pmqAQqd4M
[This is an embedded link, but you cannot view embedded content directly on the site because you have declined the cookies necessary to access it. To view embedded content, you would need to accept all cookies in your Cookies Settings]

Installation

To install isc-dev , you just need to download and import the file isc-dev.xml from last release.
Some ways to import isc-dev .xml file:

  • Go to Management Portal -> System Explorer -> Classes -> Import and select the XML file.
  • Drag the file over Studio.
  • Terminal command:
NS>do $system.OBJ.Load("yourpath/isc-dev.xml","ck")
NS>zpm
zpm: NS>install isc-dev

How to enable this feature:

  • After importing the class in the target namespace, run the following method to set up the working directory:
NS>do ##class(dev.code).workdir("/path/to/your/working/directory/src/")
  • Go to Management Portal -> System Administration -> Configuration -> Additional Settings -> Source Control.
  • Select the target namespace and set the dev.FileManExtension class as the main one and save it.
  • Try to create a new class in the studio and save/compile it
  • Enjoy!
4 4
2 434

Hi colleagues!

Every day Johns Hopkins University publishes new data on coronavirus COVID-19 pandemic status.

I built a simple InterSystems IRIS Analytics dashboard using InterSystems IRIS Community Edition in docker deployed on GCP Kubernetes which shows key measures of the disease outbreak.

This dashboard is an example of how information from CSV could be analyzed with IRIS Analytics and deployed to GCP Kubernetes in a form of InterSystems IRIS Community Edition.

Added the interactive map of the USA:

19 13
3 939

Hi developers!

Suppose you have a Github repository with ObjectScript classes but without a Docker environment.

Recently I published a repository with a set of files that form a universal Docker and VSCode environment to let you either import and run your repository in InterSystems IRIS Community Edition on Docker or turn your repository into Docker and VSCode environment for InterSystems IRIS Community Edition.

So in one sentence:

Unpack these files in your folder and you have the Docker and VSCode environment for your InterSystems IRIS ObjectScript application!

See the details below.

3 0
1 601

Our company is in the process of converting our software for use in Intersystems IRIS and one of the major sections of the software makes use of a custom statically-linked C library using the $ZF("function-name") functionality. During this, I found out that the process for setting up the C library to be used within the database platform has changed significantly between Cache and IRIS.

5 0
0 244

Hi Developers!

Many of you publish your InterSystems ObjectScript libraries on Open Exchange and Github.

But what do you do to ease the usage and collaboration to your project for developers?

In this article, I want to introduce the way how to introduce an easy way to launch and contribute to any ObjectScript project just by copying a standard set of files to your repository.

Let's go!

10 21
6 1.9K

Hi Developers!

Another way to start using InterSystems ObjectScript Package Manager is to use prebuilt container images of InterSystems IRIS Community Edition and InterSystems IRIS for Health Community Edition.

We deploy this IRIS images on DockerHub and you can run it with the following command:

docker run --rm -p 52773:52773 --init --name my-iris -d intersystemsdc/iris-community:2019.4.0.383.0-zpm

Launch a terminal with:

docker exec -it my-iris iris session IRIS

And install zpm-module as:

USER>zpm 

zpm: USER>install objectscript-math

[objectscript-math] Reload START

[objectscript-math] Reload SUCCESS

[objectscript-math] Module object refreshed.

[objectscript-math] Validate START

[objectscript-math] Validate SUCCESS

[objectscript-math] Compile START

[objectscript-math] Compile SUCCESS

[objectscript-math] Activate START

[objectscript-math] Configure START

[objectscript-math] Configure SUCCESS

[objectscript-math] Activate SUCCESS

zpm: USER>

And use same commands for InterSystems IRIS for Health using the tag: intersystemsdc/irishealth-community:2019.4.0.383.0-zpm

The images are being published on IRIS Community Edition and IRIS Community Edition for Health repositories of Docker Hub.

We will update tags with every new release of IRIS and ZPM.

Happy coding!

4 0
1 351

Hi Developers!

"objectscript.conn" :{
      "ns": "IRISAPP",
      "active": true,
      "docker-compose": {
        "service": "iris",
        "internalPort": 52773
      }

I want to share with you a nice new feature I came across in a new 0.8 release of VSCode ObjectScript plugin by @Dmitry Maslennikov and CaretDev.

The release comes with a new configuration setting "docker-compose" which solves the issue with ports you need to set up to make your VSCode Editor connect to IRIS. It was not very convenient if you had more than one docker container with IRIS running on the same machine. Now, this is solved!

Read below how it works now.

5 8
3 734

Hi Developers!

Recently we released the updated version 0.1.3 of ObjectScript Package Manager (ZPM) which comes with the support of simplified ObjectScript sources folder structure.

What 'simplified' does mean?

Before 0.1.3 ZPM expected the following structure:

/src

---/cls  - for ObjectScript classes

---/cls/package_name/class_name.cls

---/cls/package_name/class_name2.cls

---/mac - or Mac ObjectScript routines

---/mac/package_name/mac_routine.mac

---/mac/package_name/mac_routine2.mac

---/inc - for ObjectScript macro include files.

---/inc/package_name/include_file.inc

6 3
1 754

Hi Developers!

Many of you are looking for samples on how to work with InterSystems IRIS Analytics, formerly known as DeepSee.

There is a Samples BI module with Patients and Holefoods examples which is available on Github with source code. The installation steps are clear but take time.

Recently we added the option to run IRIS Community Edition containers with ObjectScript Package Manager (ZPM) on board. This simplifies the installation to the "run-one-command" step for the modules submitted to ZPM Community Registry. And thus we can benefit the Samples BI installation with ZPM.

And here is how you can run it on your laptop. Let's go!

1 1
0 336

Hi Developers!

Often when we install a code package we want to make some post-install settings, e.g. call to a method, set up a configuration file.

This article describes how to do this with the ObjectScript Package Manager.

To make any post-install calls you need to add <Invoke> elements into <Invokes> tag to the module.xml. Each <Invoke> element can have nested <Arg> elements if you want to pass params to the method:

2 0
1 453

Have you ever needed a math function but could not find what you needed and ended up writing your own? Look no further! ObjectScript-Math is here to solve all your math related function needs.

ObjectScript-Math is an Open Source library for ObjectScript Math functions. It is now available on Open Exchange. This library contains a mix of new functions that are not currently available and functions that are available. The existing functions will be wrapped for use from ObjectScript-Math so that all Math functions can have a central location.

This library will continue to grow, so give it a try and give your feedback!

Don't see what you are looking for? Please feel free to submit requests for additional functions or contribute code yourself!

3 0
1 416

Hi Developers!

As discussed in previous parts of Package Manager stories to turn your IRIS application into a deployable package you just need to introduce the module.xml file into the root folder of the repository and describe all the resources.

I’m pleased to introduce you to a new project template on Open Exchange which contains examples of how to make different types of resources of your InterSystems IRIS application a part of the ObjectScript package and so make the deployable ObjectSctipt package.

Let's see how you can describe your application resources using this template project as an example.

See the details below.

4 2
7 463

$LIST string format and %DynamicArray and %DynamicObject classes

IRIS, and previously Cache, contain several different ways to create a sequence containing a mixture of data values. A data sequence that has been available for many years is the $LIST string. Another more recent data sequence is the %DynamicArray class, which along with the %DynamicObject class, is part of the IRIS support for JSON string representation. These two sequences involve very different tradeoffs.

$LIST String Format

11 4
8 2.6K