Generate Apache Royale Application with Agent Backend - Moonshine-IDE/Moonshine-IDE GitHub Wiki

Generate Apache Royale Application with Agent Backend

Requirements

These are the Domino

  • Vagrant
  • VirtualBox
  • A DominoVagrant instance, which is a Domino server running on a VirtualBox VM. You can generate this using Super.Human.Installer. See more instructions below.

Optional:

  • PENDING: Setup NSFConverterPortalProject (not yet public) instance - Required to convert existing Domino Database.
  • Local Installation of HCL Notes - Required for accessing the database directly

Setup DominoVagrant

You can download the Super.Human.Installer installer here. The application should guide you through the process of creating the VM.

You should use Standalone or Additional Domino service (demo-tasks provisioner). No additional roles are required besides Domino. You should configure at least 8 GB of RAM (more if additional roles are added).

Once you create the VM:

  • Make sure you add an entry to your hosts file for the Domino server. Check the Welcome page to see the expected entry for this.
  • The base Domino URL (%base_domino_url% below) for the Domino server is: https://domino.%server%/
  • The Vagrant Instance should be configured automatically in Moonshine > Settings > Vagrant if you restart Moonshine. If you need to configure it manually, use: http://restapi.%server%:8080 for the Base URL
Legacy: DominoVagrant/demo
  1. Clone the repository
  2. Follow the setup instructions in the README. Note that you will need to separately download the Domino installers and create a Safe ID
  3. Open MoonshineDevelopment > Settings > Vagrant and add an entry in Linked Instances. The default "Base URL" for this instance is http://127.0.0.1:8096

image

The base Domino URL is http://localhost:8080/

Notes Client Setup

See the DominoVagrant wiki for instructions on connecting to the server.

If you get a cross-certificate error like this after recreating the instance:

image

Then clear the old cross-certificate:

  1. File > Application > Open and open names.nsf on the local server
  2. Click the Advanced link at the bottom and open the Certificates view
  3. Expand Notes Cross Certificates, then the local username.
  4. Select the /DEMO entry and delete it.

Generating a Database Project

The first step is to create a project that represents to the Domino application. There are multiple options for this.

Form Builder

FormBuilder is the simplest solution. It provides a quick way to build Forms and Views with a simple list of fields, but doesn't add any options for customization.

  1. Create a new project with File > New > Domino On Disk Project
  2. Open src/main/formbuilder. Open the existing .dfb file or create a new one.
  3. Fill out the form details as desired and click Save & Generate DXL when done.

Domino Visual Editor

Domino Visual Editor gives more control for arranging the generated forms, and more options for the fields and other components.

  1. Create a new project with File > New > Visual Editor project. For "Template Type", choose "Domino Visual Editor"
  2. An initial editor will open automatically. You can create additional forms in nsfs/nsf-moonshine/odp/Forms/ with Right-click > New > Domino Visual Editor Form
  3. Populate the mockup as desired and save when done

Converting an Existing Database

With this solution, you will be able to convert a design-only copy of an existing database into a Domino Visual Editor project. The project can then be updated as desired.

PENDING: The converter application is currently not publicly available.

Building and Generating the application

Before generating the other projects, check that the Domino settings (Right-click > Settings > Domino) match the target Vagrant VM:

  • Target Server: Use the server name selected for your Domino Vagrant instance
  • Target Database: Change this as desired
  • Base Agent URL: %base_domino_url%/%database% (https://domino.server-1.mydomain.com/MyApplication.nsf)
  1. Select the project and Create the database with Project > Build on Vagrant (Note: Currently bugged with Domino 12.0.2. In the meantime you can build the database locally with Project > Build with Apache Maven)
  2. Deploy the database with Project > Deploy Domino Database
  3. Generate the Java REST Agents with Project > Generate Java Agents
  4. Deploy the agents to the deployed database by selecting the Java project and running Project > Run on Vagrant. Note that you can fix the server or database name in gradle.properties
  5. Generate the Royale application. Select the Form Builder project and run Project > Generate Apache Royale Application
  6. Build the Royale project with Project > Build
  7. Deploy the Royale project with Project > Deploy to Vagrant Server. The application should open automatically in a browser. Otherwise, you can open it at %base_domino_url%/%project%/js-debug/index.html (Example: https://domino.server-1.mydomain.com/MyApplication/js-debug/index.html)
  8. (Optional) TODO: Copy the generated Royale application into a combined Royale Application