SDK (Java): Difference between revisions

From Tygron Support wiki
Jump to navigation Jump to search
No edit summary
m (Rudolf@tygron.nl moved page Software Development Kit to SDK (Java))
(No difference)

Revision as of 05:32, 9 July 2024

The Tygron Platform offers an API, which allows external application to interact with it. However, the specific options available via the API are not always intuitively relatable to specific operations when using the client application. To compensate for this, the SDK wraps a number of these operations into more human-understandable functions. In addition, it provides functionality to handle some of the complexity related to obtaining, storing, updating and using data present in the Tygron Platform.

Getting started with the SDK

At this time, the SDK is only available for Java, and is still in development. The recommended IDE is Eclipse, although other developments environments can be used as well.

Obtaining the SDK

The SDK is freely available from https://engine.tygron.com/api/developer/. The following projects are contained in the repository:

  • Core (required). This project contains all essentials of the SDK
  • Examples. This project contains a number of examples for interacting with the Tygron Platform both with and without the SDK.
  • Tools. This project contains practical tools developed using the SDK and made available to the public. These also serve as practical examples.

Setting up the SDK for use

To use the SDK, the Core project must be a dependency of your application. The other available projects have the Core project as their dependency. For first time usage, it is recommended to test your setup by running one or more examples. To run the examples, you will need to add your Tygron credentials to the setup. For instructions on adding your credentials to the examples, see the README of the SDK.

Using the SDK

Please note: because the SDK is still in development along with the Tygron API, the following information is subject to rapid change.

Components

Using the SDK means using one or more of the components provided to interact with the Tygron Platform. The SDK can be used as a library of functionality, just as most other software libraries. The SDK offers a number of features designed to make interaction with the Tygron API easier. The following components are most important, and can contribute the most to your application.

Items

The Items are the representation of the various types of data in a session (such as Buildings, Stakeholders, or Functions. These objects also allow the data pertaining to these items to be stored, but in many cases also offer easier methods of interacting with the data. An example of this is the ability to retrieve the exact function values for the categories of a given function.

MapLinks and Events

The Data Connector can be instructed to make a request to any url within the API, by providing a string with the desired url. However, to assure that requested urls are valid, it is recommended to make requests by supplying the MapLink or Event objects.

Utilities

In addition to the essential components listed above, a number of utility classes exist as well.

Settings

The Settings utilities allow for easy loading and storage of credentials and application settings.

Json

The Json utilities allow for easy de-serialization of data sent back by the Tygron Platform. It can de-serialize into generic List and Map structures for generic access, or to (Lists or Maps of) specific objects or Items.

Data

The Data utilities allow for the de-serialized data to be cleaned up easily, to make it easier to iterate through programmatically.

Adapting and contributing to the SDK

The SDK is continuously in development, as is the API, which means both the Software Development Kit and the API it communicates with can change rapidly. We aim to keep the two compatible as much as possible. However, it is possible that changes temporarily break functionality of the SDK. If this occurs, please contact Tygron Support.

Alternatively, because we offer the source code of the SDK freely, it is also possible to make your own changes or improvements to the SDK. If you are interested in contributing to the SDK, please contact Tygron Support.