Can you perform Kills or Sets directly on globals within .NET without ObjectScript classes or generated proxy classes ?

I think I already know the answer to this but I thought I'd ask anyway. So the Node.js adapter allows you to perform operations directly on Globals. Does the InterSystems.Data.CacheClient.dll or InterSystems.CacheExtreme.dll provide a mechanism to access Gobals directly or are you accessing globals via Caché ObjectScript classes?

  • 0
  • 0
  • 195
  • 3
  • 2


You don't need anything else to work with globals directly: Using the Globals API.

See the code examples in <install-dir>\dev\dotnet\samples\globals

Do you have any example of use with .NetCore? It is possible?

My understanding is that the Globals API namespace reference using Intersystems.Globals; is bundled  with the InterSystems.CacheExtreme.dll which relies on the traditional .NET Framework ie. not .NET Core.  Some Global API documentation recommends you use both DLLs mentioned in the question description above.

I am currently developing a .NetCore 2.1 MVC Web Application that uses Bootstrap 4,,  Newtownsoft Json Serailizer (AutoMapper is also good), Moment.js, Tempus Dominus Bootstrap 4 Themed Datepicker,  Caché ObjectScript %Persistent classes mapped to Globals (see The Art of Mapping Globals Series), Cache ObjectScript %CSP.REST classes for mapping web api calls (see Rest and Relatation Demo) and basic authentication over HTTPS. Using this development stack, I do not need to generate proxy classes using the Caché Object Binding Wizard and I have no need for either DLL but I do not have direct access to globals from my .NET classes. The backend classmethods work at the class/object level in response to HTTP requests (Web API calls) to manipulate Global values in the database.

Yes you can! but not directly!
All you need is a an Abstract Class with 

Classmethods to read, set, kill Globals as you need either static with fixed names or Global references passed by params. As you like.
And if you add SqlProc to the method you can even use it over ODBC/JDBC.