December 16, 2019 Andrew

Empower your App Development: Add Web & Email Services with Omnis Studio

You can add powerful Web and Email services and protocols into your Omnis applications using a number of different techniques or commands: this includes support for HTTP, SMTP, POP3, IMAP, and FTP communications and protocols, with additional support for JavaScript (Node.js), CRYPTO, and HASH added to Omnis Studio 10 and further extended in version 10.1. The functions behind these protocols are accessed in Omnis using a OW3 Worker Object, which means you can execute a long-running task on a background thread, for example, you can run a large mailshot that reports back to the main thread when the task is complete.

To access these services you need to create an Object Reference variable and set its subtype to one of the OW3 worker objects, such as the CRYPTOWorker object under the OW3 Worker Objects group.

OW3 Worker Objects - CRYPTOWorker Object

OW3 Worker Objects – CRYPTOWorker Object

Having created the variable you can call the web or email commands (methods) using OBJECTVAR.$methodname. The following worker objects are available:

  • CRYPTO – The CRYPTOWorker allows you to perform encryption and decryption of data, including the types AES, Camellia, DES, and Blowfish.

  • FTP – The FTPClientWorker object allows you to transfer files.

  • HASH – The HASHWorker allows you to hash data using SHA1, SHA2, SHA3, MD5, and RIPEMD hash types, which are primarily for signature purposes, while PBKDF2 is available for password hashing.

  • HTTP – The HTTPClientWorker object allows you to POST data to a server, execute a RESTful request, or download a file from a server.

  • IMAP & POP3 – The IMAPClientWorker and POP3ClientWorker objects allow you to manage emails stored on an IMAP or POP3 server.
  • SMTP – The SMTPClientWorker object allows you to send emails, including bulk emails via a mailshot.

  • JavaScript – The JAVASCRIPTWorker provides access to the node.js framework which contains many open source third-party modules that can be used from inside your Omnis code (node.js is embedded into Omnis Studio).

Example Worker Object apps

There are extensive example apps to demonstrate how you can use the OW3 Worker objects; the examples are in the Samples section in the Hub in the Studio Browser when you first start Omnis Studio. The best way to look at the Worker objects is to download Omnis Studio 10.1, open the sample libraries and examine the code. Download Omnis Studio 10.1 here:

omnis.net/developers/resources/download

, , ,

Leave a Reply

Your email address will not be published. Required fields are marked *