Module Project Generation & Deployment

The basic process of generating a module is simple. Generate a new project, configure a screen, and generate it as a file that can be deployed in the Deploy step. To generate a more specific module, you need to add features and adjust various settings. This chapter will take a quick look at the basic steps of generating a module.

Composite Component configures the screen in the form of placing the default components on Form, but other objects must be written in the script for all functions. In this chapter, we used Composite Component as an example to better understand the process of creating and deploying the module project.

Generating Project / Object

A project can have more than one object. For example, in the Chart module project, you can include multiple objects (components) such as Line Chart, Bar Chart, etc. As there must be at least one object in a project, you need to generate objects when generating a project for the first time.

1

Run nexacro Module Developer.

2

Select [File > New > Project] from the menu to start Project Wizard.

3

Select the "Composite Component" item from the Module list.

4

Enter the Project Name and click the [Next] button.

5

Enter the object ID value and click the [Finish] button.

Since the object ID is used as the component name when deploying the module, it is recommended to contain features and characteristics of the component to be generated. In the example, we will generate a component with 2 Calendar components side by side.

When the object ID is entered, the project structure to be generated is displayed in the Project Preview area.

6

The project is generated and the design editing screen where you can place the screen of the generated objects is displayed.

Configuring Composite Component Screen

It determines how the screen is shown when the user installs the module and places the components on the screen.

In the example, two Calendar components are placed side by side. Then, the type property value of the Calendar component is set to "monthonly" for the user to be able to immediately select the date when the components are placed.

1

In Project Explorer, select the xcdl file under the corresponding object.

When the project is generated for the first time, the xcdl file is displayed as open after the project is generated.

2

Select the Calendar component from the toolbar and place it on the screen.

Placing and adjusting the screen is the same as screen designing in nexacro studio.

3

Place another Calendar component and set the type property value to "monthonly". Adjust the size of each component to be appropriate.

4

Adjust the Form size to the size of the placed component.

As it is modifying the Default Size specified when generating the object, a warning window is displayed when the size is changed. Default Size is the size that is set as default when the user selects and places the component on the screen.

The Form size can vary depending on the use of the composite component. In the example, we set it to perfectly fit the size of two Calendar components.

5

Select the menu [Generate > Simulate] to check whether the generated composite component is displayed properly.

Although the emulator can check the added features, as we did not generate additional features, we can just check how the composite component is shown.

Generating Module Installation File

The generated project can be generated into a module file to deploy to the user (developer).

1

Select the menu [Deploy > Module Package] and run Deploy Wizard.

2

Modify Deploy Path to the desired path and set the Version information.

3

You can edit the JSON file by clicking the [Next] button.

If you do not need the JSON editing step, then click the [Deploy] button instead of clicking the [Next] button as in the previous step.

In the scriptsfilter item, you can set whether to deploy the app according to the operating system after installing the module. For example, with the script called TEST, if you want to deploy only the files corresponding to the operating system, then set the scriptsfilter item as follows.

"scriptsfilter":[
	{name: "SIMPLE_MODULE_PROJECT/TEST_NRE.js", target:"NRE"},
	{name: "SIMPLE_MODULE_PROJECT/TEST_WRE.js", target:"WRE, iOS_NRE"}
]

The items that can be set as the target property value are as follows.

4

After clicking the [Deploy] button, a file is generated as the xmodule extension.

Click the link in blue to open the corresponding folder.

Installing Module & Placing Components on Screen

Open a project in nexacro studio to install the deployed module file and place the composite component on the screen.

1

Run nexacro studio.

2

Generate a new project or run an existing project.

3

Select [File > Install Module] and run Install Module Wizard.

4

Select "Module Package" for Install Type and click the [Next] button.

5

Select the xmodule file generated in nexacro Module Developer and click the [Next] button.

6

Check the name of the composite component to be installed and click the [Next] button.

7

Do not check the xcss and image related settings and click the [Install] button.

8

Reload the current project when the installation is complete.

9

Open the Form screen to place the composite component.

10

Select the icon from the toolbar and place it on the screen.

Sharing Module Project

You can compress and share the entire folder of the generated module project.