I may have missed something before. Just doing some practice on NodeJS bindings. It’s still working, but I find it deprecated since last October. And it is suggested using Java Bindings on server side. May I know the reasons to deprecate the NodeJS bindings? Is Java the only bindings provided in DAML?
Hi @kctam, the release notes for SDK 1.6 provide some background here. Originally we tried to support a very wide range of bindings but realized that this didn’t really work given the resources we have available for their development and more importantly, it also made it unclear for users what the recommended set of bindings was. Therefore, we’ve now streamlined our supported bindings to a smaller set of bindings based on the ones we saw being used the most, which will hopefully allow us to develop those in a better way and address feedback more quickly. Specifically, the recommended bindings are the following:
The JSON API either via our TypeScript/JavaScript client libraries or just via HTTP calls from your favorite programming language.
The gRPC API via the Java bindings or if they fit your usecase Daml triggers. For development, Daml Script is another great option.
So if you need a direct equivalent of the NodeJS bindings look at the Java bindings. If you don’t need a direct equivalent, the JSON API and corresponding bindings or Daml triggers are another great option.
I think it’s worth mentioning that if you are tied to Node.js and willing to go off the beaten path, the Ledger API is defined with gRPC, meaning that you can generate the code to interact with it using any of the gRPC supported languages (which include Node.js).
Note that this will mean putting in the work to either work with the generated code or creating your own wrapper around them. It is, of course, an approach that can be used, but requires evaluating the trade offs involved in developing and maintaining your work. On our side, you can expect us to maintain backwards compatibility throughout the 1.x releases, so at least you don’t have to worry about that (that’s why, despite being deprecated, the bindings still work).
With that said, the JSON API is a stable and supported way to interact with your deployed Daml models, being particularly a good fit for applications that mostly require you to deal with active contracts. If you haven’t checked it out already I can definitely recommend having a look, as it saves a lot of the boilerplate involved in creating a Web server that exposes the current state of the ledger.
For anything more complicated, the Java bindings will serve you well. If they don’t, we’ll be here to help.
Hi @stefanobaghino-da thanks for your details. I am exploring to perform some demo on DAML, and after using Studio, my next step is trying using NodeJS with Sandbox. This is my common way when I explore other DLT platforms. So happen to see that DAML had one but was deprecated and that’s why I raised this.
I agree that JSON API is good enough. Just think that having SDK on other languages definitely helps developers focusing on a specific coding language. This is how other major platforms are doing.
Having said that, I just found that DAML Navigator is also a great tool and in fact I’m more now using it for demo. This tool is great as it can login with specific party and a GUI for creating contract and exercising choices. It’s quite easy for me to show how template/contract work.