Skip to main content

Getting Started

Let's build data flows using DimML in 10 minutes.

Eclipse Setup

To get a working development environment:

  • Request an API token for evaluation purposes by sending an email to support@datastreams.io.
  • Install the Eclipse IDE. If you are not sure what version to use, the Eclipse IDE for Java Developers will work great.
  • In the IDE's menu navigate to 'Help', then 'Install New Software...' and enter the following Software Site URL: https://dimml-eclipse.s3.amazonaws.com/eclipse-2020. Install the Dimml SDK extension from the list as shown in the screenshot below.
  • Enter your API key by going to 'Preferences', 'Dimml', then 'Publish' (preferences can be found in the 'Eclipse' menu on macOS or in the 'Window' menu otherwise). All other settings can be left to their default values. You should see 'DimML Sandbox' in the Partner selection dropdown. Select 'Apply and Close' to save your settings in the dialog.

Optionally Show the Dimml Explorer

The API token is a private secret that allows read and write access to a named environment on the 'DimML Sandbox' tenant (in the case of an evaluation token). To get the name of your environment and see the files already published there you should open the Dimml Explorer view.

  • In the menu go to 'Window', 'Show View', 'Other' and select 'Dimml'/'Dimml Explorer'.

Published files can be viewed, downloaded and deleted from your cloud namespace. The name of your environment is the part before the ampersand (@), e.g. 'w3Rryp5k @ DimML Sandbox' indicates 'w3Rryp5k' as the name of your environment. You will need this name to connect to dimml code you publish.

Creating a Dimml Application

You are now ready to create your first project:

  • Select 'File', 'New', 'Project...' from the menu and select 'General'/'Project' in the next dialog.
  • Name your project and select 'Finish'.

In this newly created project create a file named 'helloworld.dimml' and edit the file. Enter the following code and save your file:

@groovy
concept HelloWorld {
plugin response

flow
=> code[result = `"Hello $name"`]
=> out
}

To publish dimml code press CTRL + SHIFT + D or press the 'Publish Dimml' button () in the toolbar. This will open the publish dialog where the environment is shown again to make sure this is where you want to publish your files. Press OK to go ahead and publish.

A concept in Dimml is a grouping mechanism for flows and other application logic. Every concept is publicly addressable as long as it has an unnamed (default) flow as in the example above. The response plugin indicates that the associated flow is not a normal fire-and-forget flow, but output is expected and should be interpreted as the result of any HTTP requests made to the concept. One way of interacting with this concept is as follows (where you replace [env] with your own environment as seen in the publish dialog or Dimml Explorer):

https://dynamic.dimml.io/_/[env]@helloworld?dimml.concept=HelloWorld&name=Jim

If your environment starts with sandbox/ you should encode the forward slash, i.e. sandbox%2F. The name sandbox/w3Rryp5k will become sandbox%2Fw3Rryp5k.

When everything is setup correctly, you should see 'Hello Jim' in the browser.