Concepts

This document describes the essential concepts you should understand in order to effectively create applications in Cloudfier: entities, properties, relationships, actions and state machines.

Entities

Entities correspond to the primary abstractions in a data management application. Customer, expense, account, and purchase are all examples of entities from various domains. Entities are primarily described in terms of their properties.

Properties

Properties are bits of information that describe entities. Properties are typed, and as such accept only values compatible with their types. Properties can be required or optional.

A property can be derived, and as such, its value cannot be modified directly, but only by modifying the original values it derives from (if not a constant).

Relationships

Relationships create associations between entities. Relationships can be required or optional, single or multiple. Relationships can also be uni- or bidirectional, and even reflexive. Examples are purchase order vs. item, order item vs. product, account vs. owner, meeting vs. participant.

Actions

Actions represent changes that can be applied to instances of entities. Actions can expect parameters, which can be filled in at the time the action executes. Actions are usually verbs. Examples of actions are: checkout (purchase order), withdraw (from account) and book (meeting).

Actions can specify preconditions so they are only applicable if the instance chosen satisfies the condition. For example, an order can only be checked out if it has at least one item, a withdrawal can only occur if the account has sufficient funds etc.

Queries

Queries allow retrieval of objects that satisfy some criteria. Queries are often parameterized. An example is a query that shows all issues with a specified severity.

Constraints

Constraints specify restrictions that are imposed by business rules, in a declarative way. Constraints can be class and attribute invariants (must always be satisfied) and preconditions (must be satisfied before it is valid to perform an action).

State machines

State machines represent the states an entity can admit, the possible transitions between those states and in what conditions they should occur.

For example, for an order, possible states could be “In Progress”, “Submitted”, “Fulfilment”, “Sent” and “Delivered”.

Services

Services provide functionality that is required by the application but usually realized externally to the application. Examples are a UserNotificationService, a PaymentService and a StockQuoteService. Services can provide synchronous data querying services (via queries and actions) and asynchronous communication (via signals).

Signals

Signals allow an application to broadcast or receive events. Signals are a good way of sharing data across different applications.

What next?

You now understand the essential concepts involved in creating applications in Cloudfier. Yes, it is that simple! You are now ready to learn the language for creating applications in Cloudfier.