App Development using local IDE
You can develop the application locally by using your favourite IDE. The development scheme is shown in the following diagram.
- The most important tool is the synchronization application (sync-app). This is a java application and supported on Mac, Linux and Windows. The sync-app is responsible for keeping files and folders up-to-date locally and on trillo.io
- The sync-app is generally available as a zip and can downloaded from this link
- The zip file has following contents
- Java API class files which methods are used inside every Trillo functions as "func."
- Unzip this file in a new folder and follow the README.md to run it locally.
- if everything worked then your source code will be replicated locally. Now you can edit the source using your favorite IDE. Once famous IDE is Visual Studio Code (VSCode) - https://code.visualstudio.com
- You can find all sorts of plugins to develop in VSCode. One of the relevant plugin is called Jshell extension. Using this extension, all trillo functions MVEL will be syntax highlighted. MVEL and Java9's jshell are very similar. Once the plugin is installed, then go the preferences and associate Files with extensions *.script to jshell (shown below).
Developing with the Sync App
- Enter into the terminal shell inside ~/trillo/sync and run following command. If the config.json is correct then sync-app will start as shown below,.
java -jar *.jar
- Once the sync is started, you will notice that the "src" folder is updated with the latest workspace code (at trillo.io). From there onwards, as long as sync-app is running the source will be updated bidirectionally. Remember to create resources at trillo.io and then update them locally.
Trillo "func" API methods
There are two classes whose methods can be used as "func." API calls in any Trillo function. Use these methods interfaces as reference when calling inside your functions.