Nova postagem

Pesquisar

Resumo
· jan 1

InterSystems開発者コミュニティのダイジェスト、12月 2025

12月 2025開発者コミュニティ ニュースレターへようこそ。
全体統計
20 件の新しい投稿が公開 (12月 月):
 16件の新着記事
 4の新しい発表
5 人の新メンバーが参加 (12月 月)
1,621 件の投稿が公開 (全期間)
347 人のメンバーが参加 (全期間)
トップ記事
IRISでのPython入門
Toshihiko Minamoto順
WebSocketの使用
Hiroshi Sato順
今月のトップ作家
記事
#InterSystems IRIS
マルチプラットフォーム環境でCSPファイルをVSCodeで編集する場合の注意点
Hiroshi Sato順
Native SDK for .NETの使用方法
Hiroshi Sato順
Native SDK for Pythonの使用方法
Hiroshi Sato順
WebSocketの使用
Hiroshi Sato順
IRISでのPython入門
Toshihiko Minamoto順
ミラーリングの作成手順(プライマリ&バックアップフェイルオーバーメンバー構成)
Megumi Kakechi順
IRISにおけるPythonファーストアプローチ入門
Toshihiko Minamoto順
Jupyter Notebook から InterSystems ObjectScript を動かしてみよう!
Toshihiko Minamoto順
smolagentsとInterSystems IRIS(SQL、RAG、およびInteroperability)を使用してカスタマーサポートAIエージェントをビルドする
Toshihiko Minamoto順
パイプを使って OS の外部コマンドの出力を取得する方法
Megumi Kakechi順
Ollamaを使用して、InterSystems IRISとローカルモデルでAIエージェントを実行する
Toshihiko Minamoto順
アプリケーションの認証を独自の方法で行いたい場合に利用できる代行(委譲)認証について
Mihoko Iijima順
Node.jsによるintersystemsのためのTypeORM、typeorm-irisの紹介
Toshihiko Minamoto順
testcontainers-iris-nodeの紹介。Node.jsでIRIS統合テストを簡素化する
Toshihiko Minamoto順
サマータイムの対応について
Mihoko Iijima順
#InterSystems IRIS for Health
お知らせ
12月, 2025Month at a GlanceInterSystems Developer Community
Resumo
· jan 1

2025 年の InterSystems コミュニティ年間ニュースレター

こんにちは。2025 年の年間開発者コミュニティニュースレターへようこそ。
全体統計:
207 件の投稿が公開 (2025 年):
 138件の記事
 64件のアナウンス
 5件の質問
48 人のメンバーが開発者コミュニティに参加 (2025 年)
✓ 合計 1,621 件の投稿が公開 (全期間)
✓ 合計 21,568 人のメンバーが参加 (全期間)
最も人気:
最も議論されている
最もいいねが多い
最も人気の作成者
最も記事の多い作成者
2025 年の概要インターシステムズ開発者コミュニティ
Pergunta
· Dez. 31, 2025

Examples of using External Language Server for Dotnet

Hey everyone.

I have been taking a look at the External Language Server functionality to hook into some Dotnet functions, and I am hitting a bit of a wall.

Based on the example in the documentation here I can get the same result doing:

ENV>Set netGate = $System.external.getDotNetGateway()
ENV>Set netProxy=netGate.new("System.DateTime",0)
ENV>Write netProxy.Now,!
2025-12-31 14:37:58.6022705

However, if I then try another system class, I get an error:

ENV>Set netGate = $System.external.getDotNetGateway()
ENV>Set netProxy=netGate.new("System.Convert",0)
ENV>Write netProxy.ToBoolean(123)
<THROW>%Constructor+33^%Net.Remote.Object.1 *%Net.Remote.Exception <GATEWAY> InterSystems.Data.IRISClient.Gateway.GatewayException InterSystems.Data.IRISClient.Gateway.Gateway.dynamicFindConstructor(String className, Int32 parameterCount, Boolean isRecast) Constructor not found: System.Convert(1)

(don't judge the method choice, I know it's not supposed to do anything except return what's being passed in. Just seemed like a safe choice)

It feels like I'm missing an obvious step here.

6 Comments
Discussão (6)2
Entre ou crie uma conta para continuar
Artigo
· Dez. 31, 2025 1min de leitura

#DIM vs SET – ObjectScript

SET atribui um valor à variável em tempo de execução.

#DIM declara a variável e o seu tipo de dado em tempo de compilação.


SET #DIM
Torna a variável dinâmica. Melhora a legibilidade.
Sem tipagem. Habilita IDE auto-completion.
Tempo de execução Util para referência a objetos.

#DIM name As %String
Set name = "Micheal Scott"
#DIM age As %Numeric
Set age = 36
#DIM employer As App.Employer               ; compile time
Set employer = ##class(App.Employer).%New() ; runtime 

 

SET ou #DIM? Seu design, suas regras.

Discussão (0)1
Entre ou crie uma conta para continuar
Artigo
· Dez. 31, 2025 2min de leitura

Arquivos temporários e singletons: limpem o que vocês gerarem.

Há um padrão com o qual já me deparei várias vezes em que preciso usar um arquivo ou pasta temporária e que ela seja limpa em algum momento mais tarde.

O natural aqui é seguir os padrões de "Robust Error Handling and Cleanup in ObjectScript" , usando um try/catch/pseudo-finally ou um objeto registrado para gerenciar a limpeza no destrutor. %Stream.File* também tem a propriedade RemoveOnClose, que vocês podem ativar… mas usem com cuidado, pois podem acabar excluindo acidentalmente um arquivo importante. Além disso, esse indicador é redefinido ao chamar %Save(), então será necessário configurá-lo novamente como 1 depois disso.

Mas existe um caso complicado: imaginem que vocês precisam que o arquivo temporário sobreviva em um nível superior da pilha. Por exemplo:

ClassMethod MethodA()
{
    Do ..MethodB(.filename)
    // Do something else with the filename
}

ClassMethod MethodB(Output filename)
{
    // Create a temp file and set filename to the file's name
    Set filename = ##class(%Library.File).TempFilename()
    
    //... and probably do some other stuff
}

Vocês sempre poderiam passar objetos %Stream.File* com RemoveOnClose definido como 1, mas aqui estamos falando, na verdade, apenas de arquivos temporários.

É aí que entra o conceito de “Singleton”. No IPM , temos uma implementação base em %IPM.General.Singleton que vocês podem estender para cobrir diferentes casos de uso. O comportamento geral e o padrão de uso são:

  • Em um nível superior da pilha, vocês chamam %Get() nessa classe e obtêm a instância única, que também ficará acessível por meio de chamadas a %Get() em níveis inferiores.
  • Quando o objeto sai de escopo no nível mais alto da pilha que o utiliza, o código de limpeza é executado.
  • Isso é um pouco melhor do que usar uma variável %, porque vocês não precisam verificar se ela está definida e, além disso, ela sobrevive a NEW sem argumentos nos níveis inferiores da pilha, graças a uma certa “magia” profunda do sistema de objetos.

Passando para os arquivos temporários, o IPM também possui um singleton gerenciador de arquivos temporários . Aplicando isso a este problema, a solução é:

ClassMethod MethodA()
{
    Set tempFileManager = ##class(%IPM.Utils.TempFileManager).%Get()
    Do ..MethodB(.filename)
    // Do something else with the filename
    // The temp file is cleaned up automatically when tempFileManager goes out of scope
}

ClassMethod MethodB(Output filename)
{
    Set tempFileManager = ##class(%IPM.Utils.TempFileManager).%Get()
    // Create a temp file and set filename to the file's name
    Set filename = tempFileManager.GetTempFileName(".md")
    
    //... and probably do some other stuff
}
Discussão (0)1
Entre ou crie uma conta para continuar