Hello Community,

SQL language remains the most practical way to retrieve information stored in a database.

The JSON format is very often used in data exchange.

It is therefore common to seek to obtain data in JSON format from SQL queries.

Below you will find simple examples that can help you meet this need using ObjectScript and Python code.

6 1
3 181
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

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

Here you have an easy way to write and execute COS code from your unix scripts. This way one does not need to write routines or even open Studio or Atelier. It can be an option for simple and small actions for instance things like installation tasks or compiling.

See sample bash script (compile.sh) to compile classes:

6 2
0 857

Object Synchronization is a feature that has been around for a while, since Caché days, but I wanted to explore a bit more how it works. I've always thought that database automatic synchronization is complex by nature but, for some particular scenarios shouldn't be so hard. So I considered a very simple use case (OK, perhaps the typical one, I'm not discovering anything... but if it's common and it works, it's good wink ).

6 1
2 447

Hi Community,

This post is a introduction of my open exchange iris-fhir-client application.

iris-fhir-client can connect to any open FHIR Server by using embedded python with the help of fhirpy Library.
Get Resource information by terminal and by using CSP web application.

6 2
0 613
Announcement
· May 21, 2018
How is your code health

As a developer, usually I'm concerned about how my code health is, and how the other coders code can affect to my own work. And I'm quite sure most of us feel very similar.

In our company we use a Static Code Analysis tool to analyze code for different languages to ensure we are writing high quality and easily maintainable code by following a few best practices in terms of code structure and content. And the question was: why should be different for Caché ObjectScript language?

6 3
4 1.1K
Article
· Sep 10, 2020 3m read
How To Create "Write-Only" Code

One of the leading benefits of ObjectScript is the speed and efficiency it allows for an experienced developer. Let's look at an example of how you can benefit from ObjectScript today.

Suppose you have a class that stores the names of your users. We'll call the class Data.User, and give it a string property Name. Next, we will need a method to create a new user or update an existing one. A naive, simplistic approach might look like this example:

6 10
0 604
Article
· Aug 1, 2019 3m read
Nested set model for ObjectScript

In many projects I was faced with storing hierarchical data (tree) in classes.
By tree, I mean such data, where each node has a parent node — an object of the same class.
Many examples of such data can be given. For example, a catalog in the online store. Suppose that this online store sells books, in this case, the category tree might look like this:

6 1
1 870
Article
· Jul 6, 2023 1m read
How to overload methods in ObjectScript

InterSystems FAQ rubric

The InterSystems ObjectScript language does not allow you to define methods of the same name with different arguments. It is generally classified as a programming language called a dynamic language.

In ObjectScript, you can freely control which arguments are used when executing a method, so unlike languages ​​such as Java, which are not dynamic programming languages, there is no need to strictly distinguish methods by the number of arguments at the compilation stage.

5 0
1 199

Here in %SYS, we have already examined users, resources, and roles. Now that we know how to set all of that up, we should give it a purpose. Next we will talk about applications! As you may expect, we will see various identical class methods defined here that we have seen in the previous classes. However, some of them will have some tiny yet significant differences.

5 1
2 288

Hello community!

At the global summit in Phoenix, we (Lite Solutions) will be presenting a tool performing static code analysis on ObjectScript source files. You can see it in action at this URL:

https://demo.cachequality.com

Technically, the tool is a language plugin over SonarQube (http://sonarqube.org) and consists of three main parts:

5 6
1 1.8K

This series of articles aims to address the following topics:

  • Creation of a web application based on REST pages;
  • Overview of some tools for tracing (debugging) HTTP requests;
  • Switching from hyperevents to... hyperevents;
  • Integration with jQuery File Upload;
  • Conversion of JSON from the {id:1,parentId:1} format to the {id:1,children:[{}]} format for tree visualization;
  • Integration with jQuery EasyUI (using datagrid and tree as examples);
  • Other topics.

5 1
1 929

I'm pleased to announce the latest version of extensions for ObjectScript. Just a month has gone since my latest update, and I already have something new to show.

Important. In this version connection to the server will be disabled by default. You have to activate connection through the settings:"objectscript.conn.active" = true.

5 12
1 989

Hi guys!

Was coding today with InterSystems IRIS in a docker container and decided to share with you the commands you may find useful in everyday coding.

# docker-compose build

command to build a container. Remember, it is useful if you have dockerfile in the repo.

if the build is successful call the following to launch it:

# docker-compose up -d

Find IRIS management portal on:

localhost:port/csp/sys/%25CSP.Portal.Home.zen?$NAMESPACE=%25SYS

where the port is what you set in docker-compose.yml - 52775 in this case.

Run the following if you want to launch a terminal session inside IRIS container:

# docker-compose iris iris session iris

gfhj gj 


sdfdsfsdf





USER>

And run the following to shut down the container:

# docker-compose down

Troubleshooting

5 4
4 594

Hey Developers,

New video is already on InterSystems Developers YouTube:

Visual Studio Code for ObjectScript: Choosing an IDE/Source Code Combination

https://www.youtube.com/embed/natTHVfXzwY
[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]

5 0
0 388

Your may not realize it, but your InterSystems Login Account can be used to access a very wide array of InterSystems services to help you learn and use InterSystems IRIS and other InterSystems technologies more effectively. Continue reading to learn more about how to unlock new technical knowledge and tools using your InterSystems Login account. Also - after reading, please participate in the Poll at the bottom, so we can see how this article was useful to you!

5 4
1 332