The original CachéParameterFile iris.cpf does a mimic of versioning.
But it is buried deep into the installation directory and as cryptic as the
Egyptian Book of the Dead. [reserved to the priest of IRIS cultus]
;-) Yes, I guessed that there is an existing feature for cpf versionning when I see classmethod parameters in Config.CommonSingleMethods : classmethod Get(ByRef Properties As %String, ByRef CPFFile As %String = "", Flags As %Integer = $$$CPFSave+$$$CPFWrite+$$$CPFActivate) as %Status [ Language = objectscript ]
So, now for a complex application, we can create multiple namespaces and execute zpm command on freshly created namespaces. I am still open to any suggestions.
intersystems-iris-dev-template is also forked on my GitHub with config-api usage.
You can see the differences on this commit.
I'll keep this repo up to date for testing purposes if there is any change.
Indeed, you can't tell directly zpm to load the classes in the freshly installed namespace.
You need to perform:
zn"irisapp"
zpm "install module-name"
I consider loading the code is the role of ZPM.
In my opinion congi-api shouldn't have an option to load the code.
We could add an option to call ZPM. Something like this :
Execute zpm "install module-name" in namespace IRISAPP
Obviously this is subject to discussion. Community feedback would be appreciated.
About CPF module, I agree, my library has an overlap with all classes related to %SYS Config package.
For these operations the only difference is the REST expose. So, no added value if developers don't need REST expose.
However, config-api implement a part of %SYS Security package and also %Library SQLConnection.
You can configure users, roles, resources, ssl configuration, web application, enable services, sql connexions, set SQL Privileges and you don't with CPF module.
To deploy a large application divided into several modules, using many namespaces, databases, web applications can be complex. The best way is to write a script to configure your environment and then deploy the code as you did in this simple example with zpm.
Thank you @Evgeny Shvarov So, the main goals are REST expose and the rupture between config and code.
%Installer allows to create, users, roles, mapping too, but it's not possible to configure SQL Privileges, SSL Configuration, SQL Connexion (config-api can do).
There are a few features existing in %Installer and not in config-api, but we have a good base to implement if needed.
go to post
Thank you @Robert Cemper .
Glad to hear that!
;-) Yes, I guessed that there is an existing feature for cpf versionning when I see classmethod parameters in Config.CommonSingleMethods :
classmethod Get(ByRef Properties As %String, ByRef CPFFile As %String = "", Flags As %Integer = $$$CPFSave+$$$CPFWrite+$$$CPFActivate) as %Status [ Language = objectscript ]
go to post
Thank you @Evgeny Shvarov ,
I checked SonarQube, but It seems have only false positive due to dependencies.
go to post
Hi @Robert.Cemper,
You can try using this template, see files :
go to post
Hi @Guillaume Rongier ,
I added a feature in version 1.0.2 to call zpm directly.
The forked repository objectscript-docker-template is up to date. See commit.
So, now for a complex application, we can create multiple namespaces and execute zpm command on freshly created namespaces. I am still open to any suggestions.
Documentation up to date here
go to post
I created an issue about that.
go to post
intersystems-iris-dev-template is also forked on my GitHub with config-api usage.
You can see the differences on this commit.
I'll keep this repo up to date for testing purposes if there is any change.
@Evgeny Shvarov, @Guillaume Rongier
go to post
Hi @Guillaume Rongier ,
Thank you for this very interesting question.
Indeed, you can't tell directly zpm to load the classes in the freshly installed namespace.
You need to perform:
zn "irisapp" zpm "install module-name"
I consider loading the code is the role of ZPM.
In my opinion
congi-api
shouldn't have an option to load the code.We could add an option to call ZPM. Something like this :
{ "ZPM" : { "IRISAPP" : { "install" : "module-name" } } }
Execute
zpm "install module-name"
in namespaceIRISAPP
Obviously this is subject to discussion. Community feedback would be appreciated.
About CPF module, I agree, my library has an overlap with all classes related to %SYS Config package.
For these operations the only difference is the REST expose. So, no added value if developers don't need REST expose.
However,
config-api
implement a part of %SYS Security package and also %Library SQLConnection.You can configure users, roles, resources, ssl configuration, web application, enable services, sql connexions, set SQL Privileges and you don't with CPF module.
Hope answered to your questions.
go to post
This is the correct usage.
To deploy a large application divided into several modules, using many namespaces, databases, web applications can be complex. The best way is to write a script to configure your environment and then deploy the code as you did in this simple example with zpm.
go to post
Nice !
> I need to have two entries: SYS.Databases and Databases.
Yes, perhaps should I think to implement a short way to avoid two entries when we use default settings.
go to post
Sure, to discuss.
go to post
@Evgeny Shvarov ,
If there is an interest, this module could be an extension for ZPM client.
go to post
Thank you @Evgeny Shvarov !
For testing purposes, you should fill this file with the content in this article.
go to post
Yes, that's it.
go to post
Thank you @Evgeny Shvarov
So, the main goals are REST expose and the rupture between config and code.
%Installer allows to create, users, roles, mapping too, but it's not possible to configure SQL Privileges, SSL Configuration, SQL Connexion (config-api can do).
There are a few features existing in %Installer and not in config-api, but we have a good base to implement if needed.
go to post
Exactly @Guillaume Rongier !
I am a Manifest Installer user and It works fine.
However, sometimes people which deploy applications aren't ObjectScript developers.
Manifest Installer, need to create a class, write an XML, compile.
I would like a rupture between the configuration and the code.
Moreover, everything is exposed in REST. It could be interesting to integrate IRIS configuration from a tool in another language.
Thank you!
go to post
Glad to contribute!
go to post
It's useless on your local dev, but depending your goal :
You can try to dump
zzDumpDoc(pkg, targetDir="c:\dev\testdumpdoc\") new (pkg, targetDir) Do:'##class(%File).DirectoryExists(targetDir) ##class(%File).CreateDirectoryChain(targetDir) Set pkgDot = pkg _ ".", class = pkgDot, restore = 0 If $Isobject($Get(%request)) { Set oldRequest = %request Set oldResponse = %response Set oldSession = %session Set restore = 1 } Set %request = ##class(%CSP.Request).%New() Set %response = ##class(%CSP.Response).%New() Set %session = ##class(%CSP.Session).%New("0123456789") Do %session.Unlock() Set %request.Data("PAGE",1) = "CLASS" For { Set class = $Order(^oddDEF(class)) Quit:$e(class,1,$l(pkgDot))'=pkgDot Set %request.Data("LIBRARY",1) = $namespace Set %request.Data("CLASSNAME",1) = class Set initialIO = $IO Set file = targetDir_class_".html" OPEN file:("NRW"):2 USE file Do ##class(%CSP.Documatic.PrintClass).OnPage() USE initialIO CLOSE file } If restore { Set %request = oldRequest Set %response = oldResponse Set %session = oldSession } quit
There exits more elegant way to redirect the output (check the community).
go to post
Hi @Yuri Marx ,
I don't know.
If nothing exists:
Perhaps we can write a script to call CSP.Documatic.PrintClass.cls and dump the html response into file.
ex : /csp/documatic/%25CSP.Documatic.PrintClass.cls?PAGE=CLASS&LIBRARY=%25SYS&CLASSNAME=%25Library.Integer
A %Net.HttpRequest is not required. I guess we can create a %request object, redirect the IO and calling OnPage method.
go to post
What an exciting contest!
So happy to win in experts votes and third in community votes.
Congrats to all participants for your great apps.
Thanks to experts and community for your support!
Also special thanks to the OEX Team and all members behind the scene.
go to post
Hi,
You can try my document converter with a Generated Interoperability client app.
Install the latest version (v1.3.2+)
Set sc = ##class(dc.openapi.client.Spec).generateApp("doc", "https://www.lscalese.ovh/documentconverter/api/v1/_spec")
Open Swagger tools : http://localhost:52795/swagger-ui/index.html

Explore : http://localhost:52795/docrest/_spec
see this gif video download link for full screen view