AppModels

AppModel is one kind of Model (the other kinds are DataModels and ThingModels). Therefore it has all the properties of Models (Lifecycle of modelsModel AttributesUnique and Constraints).

A AppModel has

However, as a recommended practice, the Attributes and Actions related to a particular process or interaction (e.g. calculations, communications with other Models)  are often defined in a reusable structure called AppFacet and combined into a AppModel. This relationship was explained in the concept of Models and Model Facets.

AppModels are used to represent a unit of application logic involving a process, which could be

  1. A type of computation
  2. Interaction/communication with other Models (e.g. using queries within models)
  3. Interaction/communication with some external services

Note

Currently, AppFacet and ThingFacet have identical structures and properties - they are synonyms to each other. It is up to the developer to choose to use ThingFacet for thing related logic and AppFacet for application logic. More advanced properties specific to AppFacets will be rolled out by Atomiton in future releases.

 

An example of an AppModel

 

This pattern allows the AppFacet to be a reusable artifact, and potentially combined by multiple AppModels.

Note: One can combine multiple AppFacets within a single AppModel using comma separated list of AppFacets.

When AppModels do not have any Actions or combine any AppFacets they are equivalent to DataModel i.e pure Attributes only.

AppModel can be created, read, update and deleted using TQL queries.