How DAML & DABL Provide All the APIs Your App Will Ever Need

 

Editor’s note: This post is the fourth in our series “How to Make the Most of the DAML Application Framework.” Part 1 introduced the fundamentals of DAML/DABL architecture, Part 2 explained how that architecture simplifies the challenges of user authentication, and Part 3 discussed how it speeds front-end development. In this installment, we’ll discuss how the DABL APIs make quick work of validating and deploying DAML applications. 

In last week’s edition, we introduced some ways API support in DAML and DABL speeds and simplifies development. 

To recap: DABL’s built-in support for API logic can kick off a workflow with a single API call, while DAML provides provisions for privacy and business processes, eliminating the need for manual security logic. DAML and DABL auto-generate all the APIs you’ll ever need, so you can focus on the behavior of the application itself.

Now, let’s discuss how DABL’s API syncs up complementary endpoints in DAML and DABL. 

DABL’s API provides a RESTful endpoint that can create and exercise contracts as well as query or fetch active contracts. It also provides Websocket endpoints for streaming an active contract set. 

DABL’s JSON endpoints precisely mirror those of your DAML templates — so once your DAML templates are complete and deployed to DABL, authentication is a simple matter of passing an API key specific to individual ledger parties in the form of a JWT token. 

Because all read/write controls are baked into your DAML file, it’s straightforward for the DABL service to enforce user/DAML Party authentication without additional configuration or layers.

Application developers can use the DABL API as a substitute for sandbox actions to understand whether their workflow can work as a web application. What’s more, they can expose their apps to developers or end users. It’s easy to add integrations, interact programmatically, and easily integrate a UI. 

Because these DAML/DABL APIs are automatically made available, client-server contracts can remain fixed. That allows you to scale the back end transparently and extend a single approach to web services among unlimited templates. 

If you want to get started building your own application, go to DAML.com, download the SDK, and use projectdabl.com today. DAML is open source and always free to use, and DABL is free to start. You can find a generic React UI with the login widget implemented in this open source repo that is deployable in DABL today. 

Newsletter

Join the DAML mailinglist to get occasional updates on announcements and new releases