QuickDEV
  • ▶️Quick start
    • 🔃Overview
    • 🔑Security
  • 🎭Users management
    • 👨‍👩‍👦‍👦Members and groups
    • 🔐Permission for resources
  • 🖥️Applications
    • ➕Create applications
      • ⤴️Create application/module
      • 🔲Module
      • ✅Version and Release Management
    • 🎨Application editor
      • 👁️‍🗨️Visual components
        • ⚙️Common component settings
        • ⬆️File upload
        • 📊Charts and graphs
        • 🌄Image
        • 📋Option lists
        • 📑List view
        • ⬜Drawer
        • 🗺️Google maps
        • 📩Messages / Toast
        • 📅Calendar
        • Custom component
      • #️⃣Use markdown
      • ⌨️Keyboard shortcuts
    • 🔗Navigation
    • ⏯️Actions editor
      • ⏱️Date handling
      • 🟰Data selection & JavaScript
      • ⚡Event handlers
      • 🔎JavaScript Query
      • ✖️Dynamic variable
      • 💱Transformers
      • 🧮Data responder
      • ↕️Built-in JS functions
      • 📚Third-party libraries
    • 🖌️Styling
      • 📝Themes
      • 🖍️Customize styles
  • 🚀Database & API
    • 🔎Queries
    • 🧰Query repository
    • 📡Datasources
      • 🌎API
        • 1️REST API
        • 2️GraphQL
        • 3️Google Sheets
      • 🟠SQL Databases
        • 1️Oracle
        • 2️Microsoft SQL Server
        • 3️MySQL
        • 4️PostgreSQL
        • 5️MariaDB
      • 🟡NoSQL Databases
        • 1️MongoDB
        • 2️CouchDB
        • 3️DynamoDB
      • 🔴REDIS
      • 🟢BigData & OLAP
        • 1️Big Query
        • 2️Snowflake
        • 3️ClickHouse
        • 4️Elasticsearch
      • 🌐WebSocket
  • 💻Integrations
    • 1️ANGULAR
    • 2️HTML Pages
Powered by GitBook
On this page
  • Create a new Module
  • Integrating Modules into Apps or Other Modules
  • Module settings
  • Input
  • Output
  • Method
  • Event
  • Permissions
  • Releases and versions
  1. Applications
  2. Create applications

Module

PreviousCreate application/moduleNextVersion and Release Management

Last updated 1 year ago

One of the most powerful concepts of QuickDEV is Modules. QuickDEV Modules are essentially applications that can be included and replicated within other applications. You have the capability to insert a module into an app or other modules (referred to as external apps in the remainder of this document), and it operates just like a single component. Moreover, Modules can be seamlessly

When constructing an app, the aim is often to reuse a set of components and queries across different apps. Consider a User-Profile Card comprising elements such as Profile Image, Name, and Contacts. By creating these elements within a Module, you can seamlessly integrate them into all other apps as if they were a single component.

Create a new Module

To access the module editor, simply click on "New" > "Module" located at the top right corner of the Admin Page.

Editing a Module or App is essentially the same, except for the Module Settings. The placement of Components and Data Queries operates identically to the App Editor. You can insert components and create queries using the same methods as in your typical App-building process.

Within the Module Editor, you can adjust the size of a module by dragging its bottom-right corner to your preferred default size. However, it's important to note that the screen size within the editor doesn't accurately reflect the module's real horizontal size. This dimension is defined at the app level where the module is ultimately placed.

Changes made within Modules will only be available and active for Apps utilizing the Module after the Module has been republished.

You can control the component height scales with the container by toggling the button in the Properties panel. This feature is applicable only to fixed-height components within the module.

Integrating Modules into Apps or Other Modules

During the editing process of an App or Module, navigate to "Insert" > "Extensions" > "Modules" to reveal the available modules you have access to.

Subsequently, drag and drop the module onto the canvas, configure input parameters, and adjust styles within the module's Properties panel.

You have the freedom to choose the horizontal size as desired. However, the Module inside maintains the bounding box size at 100% of its horizontal size.

Module settings

For effective embedding, modules are capable of interacting with external apps or websites. There are four essential elements to facilitate communication with a module.

  • Inputs: dynamic parameters passed into the current module from external apps.

  • Outputs: set data exposed to external apps.

  • Methods: external apps can interact with modules through exposed methods. For example, you might define a module with a changeTitle method, allowing external apps to call it and change the module's title.

  • Events: module events can be managed by external apps. For instance, you can specify an event like stockChanged, allowing external apps to attach event handlers to it once the module fires the stockChanged event.

Input

Module inputs are parameters sent to the module from external apps. They support various input types including data, string, number, array, boolean, and query. Four of them represent basic data types, with "data" being chosen to avoid constraining it to a specific data type. When selecting the query type, external apps can pass in a query and trigger it within the module. Subsequently, you can reference a module input parameter by its assigned name.

Add a new Input

Within the Settings tab (marked in green), click on the "+ Add" button to generate a new input. Then, click on the input to rename it and designate a data type.

Input Test

To swiftly assess the functionality of Input parameters while editing a Module, utilize the Input Test feature. Within the Module Editor, select the entire Module to perform tests with simulated input data in the Properties panel of the Module (highlighted in blue).

Ensure that you remove any test data before publishing the Module.

Output

Module outputs consist of data made accessible to an app or other modules. You can examine the outputs of a module in the data browser and access them via JavaScript code enclosed in {{ }}. Subsequently, you can inspect and reference the outputs of a module in apps or other modules that utilize it.

We recommend carefully selecting output data names.

  • Make sure they express the module origin

  • Make sure they express the inner source (from data, from action etc.)

Method

Methods are used to initiate operations or actions within a Module from external sources, such as your App or the webpage where the Module is embedded.

Add new Method

Within the Settings tab, click on the "+ Add" button to generate a new Module Method. Then, click on the Method to rename it and specify an action.

When creating a Method for a Module, you're unable to establish input parameters for the Method. You can only reference parameters within the scope of the current Module.

Call a Method

When employing modules, you can invoke a module method in two distinct ways:

  • Within event handlers, you can select Action > Control component, and then proceed to choose the component and method accordingly.

  • When using JavaScript queries, remember to apply dot notation. For instance, module1.clearAll() invokes the method clearAll() of module1.

Method Test

You can simulate method calling testing using the Method Test function.

Event

Add a new event

Navigate to the Settings tab, then click on "+ Add" to generate a new module event. Subsequently, click on the event to specify its name.

Trigger an event

In the provided example, the event contentChange is activated whenever the content within any input box changes. You can initiate it in two manners:

  • Within the event handlers of both input components, follow these steps: click on + Add, choose Change as the component event, select Trigger module event as the action, and finally, opt for the module event contentChange.

  • Using dot notation in JavaScript queries is essential. For instance, you have the option to trigger the contentChange event as follows: contentChange.trigger().

Event handlers

When an app incorporates a module, you may specify how the current app responds to the module's events. For example, within module1's Event handlers, you can add an action by clicking + Add, then selecting the module event contentChange and choosing the action Show notification.

Permissions

End users are automatically granted permission to view modules in apps or other modules they have viewing permissions with. However, if you're an editor and want to utilize a module in external apps, you should have at least the viewer's role for that module.

Releases and versions

Events facilitate the transmission of signals from a module to external apps. For instance, you might define events such as orderPlaced or OrderModified within an order management module. These events can be added and triggered within the module, while external apps can handle them using .

QuickDEV retains historical versions of your modules for reference purposes. To access this feature, click on "Preview" > "Publish" located at the top right corner. The release management process for a module mirrors that of an app. For more detailed information, consult the .

🖥️
➕
🔲
Event Handlers
version history
integrated or embedded natively within other web applications!