Enginio Manual

This manual shows how to use the Enginio library in a Qt application. Both C++ and QML applications are covered. The manual is also used when integrating Enginio into an existing Qt project.

Enginio is a Backend-as-a-Service solution for simplifying backend development of connected and data-driven applications.

Getting Started

First read the installation notes and prerequisites, then follow one of the short tutorials for using Enginio, either with QT Quick or with C++.

Reference documentation and examples:

  • Enginio C++ Classes and Examples
  • Enginio QML Types and Examples

    Enginio documentation is also available at the Qt Cloud Services website here.

Enginio Overview

The Enginio APIs have a general pattern that is useful to understand. This section gives a short overview of the API concepts used throughout the library.

Enginio is a client-side library for communicating with the server at http://engin.io. Multiple backends can exist in each server account. When communicating with the server, the backend is specified by a backend id. When multiple users load an Enginio application, the all use the same backend id.

Objects

Enginio provides several types of objects. These include users, user groups, files, custom objects, and more. All communications with the backend use JSON. When using the QML API, JSON objects are simply written inline. When using the C++ API, the QJsonObject and QJsonValue classes are used.

Each JSON object in Enginio has the reserved properties id, objectType, createdAt, and updatedAt. For example, a custom object with no user-defined properties will look like this in JSON:


  {
      "id": "51cdbc08989e975ec300772a",
      "objectType": "objects.todos",
      "createdAt": "2013-06-28T16:38:32.369Z",
      "updatedAt": "2013-06-28T16:38:32.725Z"
  }

But custom object types are normally augmented with user-defined properties that contain the application-specific data. A user-defined property can also contain a JSON object. For a more detailed description of Enginio objects, see the Enginio Object documentation.

Operations

The basic operations on objects are shown in the table below. For a complete list of operations see the EnginioClient for C++ or the EnginioClient for QML.

OperationDescriptionC++QML
createInsert a new object into the databaseEnginioClient::create()EnginioClient::create()
queryQuery the databaseEnginioClient::query()EnginioClient::query()
updateUpdate an object in the databaseEnginioClient::update()EnginioClient::update()
removeRemove an object from the databaseEnginioClient::remove()EnginioClient::remove()

Note: User and access control list management are also performed using these same functions.

File Management

For file management, these operations are slightly different in that files are always attached to objects and can only be accessed through their objects. The Qt library provides convenient functions to upload and download files.