https://github.com/evshvarov/objectscript
The project demonstrates the "ideal" usage of ObjectScript coding guidelines for various ObjectScript use cases.
https://github.com/evshvarov/objectscript
docker intersystems intersystems-iris objectscript
Last synced: about 1 month ago
JSON representation
The project demonstrates the "ideal" usage of ObjectScript coding guidelines for various ObjectScript use cases.
- Host: GitHub
- URL: https://github.com/evshvarov/objectscript
- Owner: evshvarov
- License: mit
- Created: 2018-08-26T12:21:04.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2024-08-12T18:42:09.000Z (over 1 year ago)
- Last Synced: 2024-08-12T21:45:31.293Z (over 1 year ago)
- Topics: docker, intersystems, intersystems-iris, objectscript
- Language: ObjectScript
- Homepage:
- Size: 33.2 KB
- Stars: 5
- Watchers: 6
- Forks: 6
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ideal_objectscript
InterSystems objectscript app template with object script samples for code guidelines and deployment.
# Installation
Checkout the repo into a folder (e.g. git clone)
Make sure you have Docker installed.
build the container:
$ docker-compose build
run container:
$ docker-compose up -d
# How to Develop
Install [VSCode](https://code.visualstudio.com/) with [VSCode-ObjectScript](https://openexchange.intersystems.com/package/VSCode-ObjectScript) plugin
Checout this repo into a folder
Open the folder in VSCode
Make sure you have IRIS docker container running (check the Installation section above).
Because of the settings in .vscode folder VSCode will connect to container and Namespace properly.
Develop.
# How it Works
# Hello World
start IRIS terminal and call the sample method:
$ docker-compose exec iris iris session iris
```
USER>w ##class(Example.ObjectScript).HelloWorld()
Hello World!
```
# Writing to the device and using class paremeters
This method write system info and class version to the device. Open terminal and call WriteToDevice() method:
```
USER>d ##class(Example.ObjectScript).WriteToDevice()
The version of the class: 1.0
The version of the system: Cache for UNIX (Apple Mac OS X for x86-64)
```
# Array Sample
```
USER>do ##class(Example.Globals).ArraySampleTest()
Initial array:
^A(1)=1
^A(2)=2
^A(3)=3
^A(4)=4
^A(5)=5
^A(6)=6
^A(7)=7
^A(8)=8
^A(9)=9
^A(10)=10
After multiplication:
^A(1)=2
^A(2)=4
^A(3)=6
^A(4)=8
^A(5)=10
^A(6)=12
^A(7)=14
^A(8)=16
^A(9)=18
^A(10)=20
```