AppModels
AppModel is one kind of Model (the other kinds are DataModels and ThingModels). Therefore it has all the properties of Models (Lifecycle of models, Model Attributes, Unique and Constraints).
A AppModel has
- a name,
- any number of Model Attributes
- and usually one or more Actions
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
- A type of computation
- Interaction/communication with other Models (e.g. using queries within models)
- 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.