Skip to content
Kenneth Endfinger edited this page May 25, 2015 · 1 revision

When writing DSLinks with the Dart SDK, there are some best practices that are recommended that most people follow.

Multiple Connections for Connectors

If you are designing a DSLink which connects to an external service to retrieve data, and that service has an account system, it is a best practice to support multiple accounts or connections. This ensures that users who want to pull data from multiple accounts or connections don't have to run a second link in order to do so.

Make Links Configurable

It is bad practice to hardcode broker urls, and in most cases DSLink names. If you are using the LinkProvider functionality on the standalone Dart VM for the command line, you don't really need to worry about this, as the interface for configuration is in there already. However, if you are designing a browser DSLink, it is highly critical you provide the user with either a UI to configure these options, or some other way to configure the link that is external (such as making an HTTP request to a url, and if it exists, use the contents as the configuration of the link).

Include a DSLink descriptor file

If you are developing a standalone link on the Dart VM, it is critical that you provide a dslink.json file. You can see examples here. This allows users to use link managers to configure and manage your link.