Hi Community!

Sometimes I meet a method which accepts 10+ parameters.

And often I need only the 8th parameter to pass. And I call the method something like:

do ##class(Some.Feature).Method(,,,,,,,"flag")

And I don't like this method when I call it like this cause, you know, often I just miss the number of commas and raise some other flag I wanted.

How do you avoid this situations?

If you meet such a code, how do you call it and sure that you didn't miss the number of ","?

What is a good number of parameters in a method and f you need to pass more parameters in a method what do you do?

3 27
1 1.4K

Hi Devs!

A few months ago I raised a discussion on the naming convention for ZPM modules.

And you free to put your name or your organization name for the packages you want to have your personal or company's brand.

But if you contribute to community, we suggested to have "community." package for all such libraries.

But the name is too long.

2 19
1 410
· Sep 28, 2020
%Status usage in ObjectScript

Hi developers!

Want to discuss with you the case of %Status.

If you familiar with ObjectScript you know what is it. I'd love to hear the history of the case why it had appeared in ObjectScript but it turned out that almost every system/library classmethods return %Status and there is a whole set of tools to deal with it.

What is does it gives you the responsibility to check the value or %Status of every system method you call.

E.g. if you save the data of the persistent class, you should never call like this:

do obj.%Save()

you need to call:

set sc=obj.%Save()

if $$$ISERR(sc) do // something or quit.

1 19
0 791

Hi Developers!

Often we need to use relatively small arrays with constants, static arrays in algorithms, etc where we need to do something with each element of an array. There are several ways to deal with it in ObjectSctipt.

Previously I used to use globals, locals, PPG for this but not so long time ago figured out that %List is a way too handy.

Indeed, suppose we have an array of months and need to set up and use it in our code.

2 15
1 536

Hello, InterSystems community!

Lately, you have probably heard of the new InterSystems Package Manager - ZPM. If you're familiar with it or with such package managers as NPM, Dep, pip/PyPI, etc. or just know what is it all about -- this question is for you! The question I want to arise is actually a system design question, or, in other words, "how should ZPM implement it".

4 14
0 290

Hi, Community!

Open Exchange (OEX) is getting more and more popular and more and more developers consider publishing their apps in the public package manager registry.

This is really great!

So the topic of thoughtful naming convention is getting more important and even critical. Let's discuss?

1 6
0 308

Hi folks!

We have a bunch of templates on OEX that provide a handy foundation for building a particular application with IRIS. And the basic principle of each and every template is that we take vanilla IRIS images, load code, and files into the image using Dockerfile, and create a new docker image as a solution. And then we develop running this image and rebuilding it when returning to development.

Some developers ask me why we need to build the docker image to work with the code. Indeed, if at the end of the day I need to develop a ZPM package and not a docker image why don't run the vanilla image and load the code and everything in it?

The problem I have with the building image approach is that often I can wait a lot to build an image and it fails on some Objectscript problem in the source that I cannot fix as the image is not building. and

Any thoughts? How do you develop with docker?

1 4
1 256

Good morning, evening, night,... wink

A small reflection/question for today... it's true that new IRIS for Health (I4H) releases are more and more powerful each time regarding FHIR capabilities. Nowadays it allows us to consume FHIR resources with extrem easiness, we can connect with end-points in external FHIR servers very easily and make I4H act as passthrough or consume their resources... or, even more, we can define, configure and run a FHIR repository in, literally, less than 5 minutes.

7 3
0 261

Hi Community,

A long time ago, I create a package for a String datatype that works with Regular Expression. It is quite a simple solution.

This can work well with packages like the OpenAPI-Suite, where you can then use the "Regular Expression String" as the type for properties of the validator objects where the Swagger contained a Regular Expression.

I am proposing we start a common package of datatypes for use. The package name to use can be provided by the admins.

3 3
0 147

This is a lesson learned, which I would like to share with community.

Recently I ran into an issue, where I was using %ConstructClone and it kept cloning extra records, which were not needed. The record for which I was trying to run a clone had many-to-one relationships.

The solution to this issue was using param -1. If you run %ConstructClone(-1) it will not clone relationships, but rather just clone single oref as desired in this case.

I hope this information helps someone who is working with similar records.

4 0
0 352

When overwriting the Read method (that has a %CacheString return type) on a new class that inherits %Stream.FileCharacter class, returns an error about incorrect return type, must be Binary, even if it matched the real signature.

Looking at the compile global information we can see:


After further investigation we realise that there is a generator method looking at the OdbcType class definition.

Setting LONGVARCHAR results in:


0 0
0 137