{ }

Objects (aka Documents) can range from the very simple to the very complex depending on the nature of the underlying data and how it needs to be accessed and cataloged. Objects have properties which are values associated with a simple alphanumeric string (no spaces) called the property name. Here is an example Person Object with three properties (fName, lName, age) and Bon’s value for each:

Bon Scott (Person Object)
Property Name Value
fName Bon
lName Scott
Age 27

Values can take a variety of types:
  • Booleans: The simplest type in computing: either true or false
  • Integers: A whole number Ex: -1, 0, 1, 2 …
  • Floats (Decimals): A number with optional decimal component Ex: 12.145, 7.2, 5
  • Strings: Character sequences usually depicted in double quotes: Ex: “Hello World”
  • Object References: A reference to another object in the database
  • Inline Objects: Freeform objects can be embedded into other documents rather that storing separately and referencing. Allows for greater flexibility
  • Arrays: Powerful value type that is an ordered list of other values and is represented by a comma separated list within square brackets Ex: [1, “Tom”, 22]. Arrays can be more complicated, for example:
  • Array of Inline Objects
  • Array of Object References

Global Values

In addition to the above types, Chakra7 also offers an additional type called global values. These are system wide categorizations that can be used in various object definitions.

In many systems, data needs to be categorized into one (or more) of several distinct categories. For example, a Book object may have a Genre property which can be any value from the list of available Genres. Further, perhaps within the same system an Author object can have a Genres parameter with multiple Genre values.

For this special case where you have a fully exhausted enumeration of the various options, a new Global Value can be created and used in various ways by different aspects of the system.

User Access (User Sessions)

Most systems worth developing have user accounts which incorporate the notions of user credentials, roles, privileges and other user info. Chakra7 offers this functionality out of the box.

Navigate to the “User Sessions” tab in Chakra7 Studio and check the box to enable user sessions:

This will automatically create two special Object types: SystemUser and SystemPassword:

The system’s designer can add or remove fields as necessary for SystemUser except for “login” which is the username by which the user will access the system. A common field is Role or Privileges which we recommend defining as Global Values. For example:

In web development, sessions are values that are stored on the server for each unique visitor (technically, for every unique browser). It is therefore often convenient to store commonly referenced user properties as a session instead of resorting to a database query. The User Sessions Chakra7 feature allows you to easily select which SystemUser properties are stored as sessions.

Once user sessions are enabled, access to the system will require a username and password. The root user’s credentials by default are:

Username: root
Password: admin123