📄️ A Quick Tour
Since the QodlyScript language is highly related to web development, printing the traditional "Hello, world!" message on screen only requires a web form to be displayed and the following line:
The Blob class lets you create and manipulate blob objects (4D.Blob).
When a user class is defined in the project, it is loaded in the QodlyScript environment. A class is an object itself, of "Class" class, which has properties and a function.
The Collection class manages collection type elements.
The CryptoKey class in QodlyScript encapsulates an asymmetric encryption key pair.
A DataClass provides an object interface to a database table. All dataclasses in a Qodly application are available as a property of the ds datastore.
A Datastore is the interface object provided by ORDA to reference and access a database. The Datastore object is returned by the ds command, a shortcut to the main datastore.
📄️ Date and Time
Date and time commands handle date and time type values.
These commands allow you to control the execution of your code.
Creating, sending or receiving emails in Qodly is done by handling an Email object.
An entity is an instance of a Dataclass, like a record of the table matching the dataclass in its associated datastore. It contains the same attributes as the dataclass as well as the data values and specific properties and functions.
An entity selection is an object containing one or more reference(s) to entities belonging to the same Dataclass. An entity selection can contain 0, 1 or X entities from the dataclass -- where X can represent the total number of entities contained in the dataclass.
File objects are created with the file command. They contain references to disk files that may or may not actually exist on disk. For example, when you execute the file command to create a new file, a valid file object is created but nothing is actually stored on disk until you call the file.create() function.
The FileHandle class has functions that allow you to sequentially read from or append contents to an opened file object. A file handle can access any part of a document.
Folder objects are created with the folder command. They contain references to folders that may or may not actually exist on disk. For example, when you execute the folder command to create a new folder, a valid folder object is created but nothing is actually stored on disk until you call the folder.create() function.
A 4D.Function object contains a piece of code that can be executed from an object, either using the () operator, or using the apply() and call() functions. QodlyScript proposes three kinds of Function objects:
The HTTPRequest class allows you to handle HTTPRequest objects that can be used to configure and send requests to an HTTP server, as well as to process the HTTP server responses.
The IMAPTransporter class allows you to retrieve messages from an IMAP email server.
Attachment objects allow referencing files within a Email object.
The Object commands manage object type elements.
Multi-tasking in QodlyScript is the ability to have distinct operations that are executed simultaneously. These operations are called processes. Multiple processes are like multiple users on the same computer, each working on his or her own task. This essentially means that each method can be executed as a distinct task.
Session objects are returned by the Session command. The Session object is automatically created and maintained by the Qodly web server to control the session of a web client (e.g. a browser). This object provides the web developer with an interface to the user session, allowing to manage privileges, store contextual data, share information between processes, and launch session-related preemptive processes.
Signals are tools provided by the QodlyScript language to manage interactions and avoid conflicts between worker processes in a multiprocess application. Signals allow you to make sure one or more process(es) will wait for a specific task to be completed before continuing execution. Any process can wait and/or release a signal.
String is a generic term that stands for string and text values.
System workers allow the QodlyScript code to call any external process on the server machine. System workers are called asynchronously. By using callbacks, Qodly makes it possible to communicate both ways.
The Users class allows you to get information about users of your Qodly application. It can be used, for example, to display the name of the currently connected user.
The 4D.WebForm class object provides an interface that allows you to handle your webform components. 4D.WebForm objects are instantiated with the webForm command.
The 4D.WebFormItem class allows you to handle the behavior of your webform components.
The WebServer class API allows you to start and monitor a web server for the your application. This class is available from the 4D class store.
A QodlyScript ZIP archive is a File or folder object containing one or more files or folders, which are compressed to be smaller than their original size. These archives are created with a ".zip" extension and can be used to save space or transfer files via mediums which may have size limitations (e.g., email or network).
The following properties and functions from the File class are available to ZIPFile objects:
The following properties and functions from the Folder class are available to ZIPFolder objects: