Skip to content

Commit 52cc765

Browse files
authored
Merge pull request #8 from intersystems-community/isc-rsingh-patch-1
2 parents d668fa2 + 89c4e43 commit 52cc765

1 file changed

Lines changed: 35 additions & 27 deletions

File tree

README.md

Lines changed: 35 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,19 @@
44

55
[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg?style=flat&logo=AdGuard)](LICENSE)
66
# intersystems-iris-dev-template
7-
This is a basic template of a dev environment to edit, make a package module, compile, debug, test, commit/push the objectscript code with InterSystems IRIS.
7+
This is a basic template for a development environment to work with ObjectScript in InterSystems IRIS. It helps you edit, compile, commit/push, debug and test your ObjectScript code. It also aids in packaging your application as a module installable with ZPM.
88

99
## Description
10-
The idea of the repository is to provide a read-to-go dev environment if one needs to code InterSystems ObjectScript.
11-
* The template runs InterSystems IRIS Community Edition running in a docker container
12-
* It creates a fresh new namespace and database IRISAPP
13-
* It loads the ObjectScript code into IRISAPP database using Package Manager
14-
* It suggests development with 'Package First' paradigm. Watch the video](https://www.youtube.com/watch?v=havPyPbUj1I)
15-
* Provides unittests environment: sample unittests, tests module enablement
10+
This repository provides a read-to-go development environment for coding productively with InterSystems ObjectScript. This template:
11+
* Runs InterSystems IRIS Community Edition in a docker container
12+
* Creates a new namespace and database IRISAPP
13+
* Loads the ObjectScript code into IRISAPP database using Package Manager
14+
* Promotes development with the 'Package First' paradigm. [Watch the video](https://www.youtube.com/watch?v=havPyPbUj1I)
15+
* Provides a unit testing environment: sample unit tests, tests module enablement
1616

1717
## Usage
18-
start a new dev repository with InterSystems IRIS using this one as a template.
19-
Once you clone the new repo on your laptop and open the VSCode with installed InterSystems Pack you'll be able to start development immediately
18+
Start a new dev repository with InterSystems IRIS using this one as a template.
19+
Once you clone the new repo to your laptop and open VSCode (with the [InterSystems ObjectScript Extension Pack](https://marketplace.visualstudio.com/items?itemName=intersystems-community.objectscript-pack) installed) you'll be able to start development immediately.
2020

2121
## Prerequisites
2222
Make sure you have [git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git) and [Docker desktop](https://www.docker.com/products/docker-desktop) installed.
@@ -74,21 +74,21 @@ IRISAPP>write ##class(dc.sample.PersistentClass).ReadProperty(id)
7474
Test string
7575
```
7676

77-
7877
## How to start the development
7978
This repository is ready to code in VSCode with ObjectScript plugin.
80-
Install [VSCode](https://code.visualstudio.com/), [Docker](https://marketplace.visualstudio.com/items?itemName=ms-azuretools.vscode-docker) and [ObjectScript](https://marketplace.visualstudio.com/items?itemName=daimor.vscode-objectscript) plugin and open the folder in VSCode.
79+
Install [VSCode](https://code.visualstudio.com/), [Docker](https://marketplace.visualstudio.com/items?itemName=ms-azuretools.vscode-docker) and the [InterSystems ObjectScript Extension Pack](https://marketplace.visualstudio.com/items?itemName=intersystems-community.objectscript-pack) plugin and open the folder in VSCode.
8180
Open /src/cls/PackageSample/ObjectScript.cls class and try to make changes - it will be compiled in running IRIS docker container.
8281
![docker_compose](https://user-images.githubusercontent.com/2781759/76656929-0f2e5700-6547-11ea-9cc9-486a5641c51d.gif)
8382

84-
Feel free to delete PackageSample folder and place your ObjectScript classes in a form
83+
Feel free to delete PackageSample folder and place your ObjectScript classes in the form
8584
/src/organisation/package/Classname.cls
8685
[Read more about folder setup for InterSystems ObjectScript](https://community.intersystems.com/post/simplified-objectscript-source-folder-structure-package-manager)
8786
and her on the [naming convention]()
8887

89-
## running unittests
90-
The template contains to test classes: TestObjectScript.cls and TestPersistentClass.cls
91-
To run the unittests we can use Package Manager environment.
88+
## Running unit tests
89+
The template contains to test classes: `TestObjectScript.cls` and `TestPersistentClass.cls `
90+
To run the unit tests we can use Package Manager environment.
91+
9292
```
9393
IRISAPP>zpm
9494
@@ -135,55 +135,63 @@ All PASSED
135135
[dc-sample-template] Test SUCCESS
136136
zpm:IRISAPP>
137137
```
138+
138139
In case of test errors you can check it back in the UnitTest portal, that can be easily opened via ObjectScript menu in VSCode:
139140
![vscvode unittest](https://user-images.githubusercontent.com/2781759/152678943-7d9d9696-e26a-449f-b1d7-f924528c8e3a.png)
140141

141142
## What else is inside the repository
142143

143144
### .github folder
144-
it contains to github actions workflows:
145-
1. github-registry.yml
145+
146+
Contains two GitHub actions workflows:
147+
1. `github-registry.yml`
146148
Once changes pushed to the repo, the action builds the docker image on Github side and pushes the image to Github registry that can be very convenient to further cloud deployement, e.g. kubernetes.
147-
2. objectscript-qaulity.yml
149+
2. `objectscript-qaulity.yml`
148150
with every push to master or main branch the workflow launches the repo test on objectscript issues with Objectscript Quality tool, [see the examples](https://community.objectscriptquality.com/projects?sort=-analysis_date). This works if the repo is open-source only.
149151

150152
Both workflows are repo agnostic: so they work with any repository where they exist.
151153

152154
### .vscode folder
153-
it contains to files to setup vscode environment:
155+
Contains two files to setup vscode environment:
156+
154157
#### .vscode/settings.json
155158

156-
Settings file to let you immedietly code in VSCode with [VSCode ObjectScript plugin](https://marketplace.visualstudio.com/items?itemName=daimor.vscode-objectscript))
159+
Settings file to let you immediately code in VSCode with [VSCode ObjectScript plugin](https://marketplace.visualstudio.com/items?itemName=daimor.vscode-objectscript))
157160

158161
#### .vscode/launch.json
159-
Config file if you want to debug with VSCode ObjectScript
160162

163+
Config file if you want to debug with VSCode ObjectScript
161164

162165
### src folder
163-
contains source files.
166+
167+
Contains source files.
164168
src/iris contains InterSystems IRIS Objectscript code
165169

166170
### tests folder
167-
contains unittests for the ObjectScript classes
171+
Contains unit tests for the ObjectScript classes
168172

169173
### dev.md
170-
contains a set of useful commands that will help during the development
174+
175+
Contains a set of useful commands that will help during the development
171176

172177
### docker-compose.yml
173-
a docker engine helper file to manage images building and rule ports mapping an the host to container folders(volumes) mapping
178+
179+
A docker engine helper file to manage images building and rule ports mapping an the host to container folders(volumes) mapping
180+
174181
### Dockerfile
175182

176183
The simplest dockerfile which starts IRIS and imports code from /src folder into it.
177184
Use the related docker-compose.yml to easily setup additional parametes like port number and where you map keys and host folders.
178185

179186

180187
### iris.script
181-
contains objectscript commands that are feeded to iris during the image building
188+
189+
Contains objectscript commands that are feeded to iris during the image building
182190

183191
### module.xml
192+
184193
IPM Module's description of the code in the repository.
185194
It describes what is loaded with the method, how it is being tested and what apps neeed to be created, what files need to be copied.
186195

187-
188196
[Read about all the files in this artilce](https://community.intersystems.com/post/dockerfile-and-friends-or-how-run-and-collaborate-objectscript-projects-intersystems-iris)
189197

0 commit comments

Comments
 (0)