Xbasic Function Libraries, Modules, and External Classes

Description

Xbasic scripts used in mobile and web applications can be added to a workspace as Xbasic Function Libraries, Modules, or Class files.

Name
Description
Xbasic Function Libraries

Xbasic Function Libraries can be used to create Xbasic functions for use in Ajax callbacks in mobile and web applications.

Xbasic Modules

Xbasic Modules can be used to package Xbasic scripts used in a web project. The advantage of Xbasic modules over function libraries is that you can selectively choose what functions are publicly accessible from the module.

Xbasic Class Files

In the Web Control Panel, the Xbasic Class category contains user-defined Xbasic classes which can be used in any server-side Xbasic script, including inside Xbasic Function Libraries and Xbasic Modules.

Encrypting Xbasic function libraries, Modules, and Classes

If an Xbasic Module, Class, or Function Library contains scripts that need to be encrypted, you can use the 'ENCRYPT and 'PASSWORD comments to encrypt the file and optionally add password protection.

What is the Difference Between an Xbasic Module and an Xbasic Function Library?

While an Xbasic Function Library and Xbasic Module may seem to be the same thing, the two Xbasic constructs have several key differences.