Basic Terminology
At its core, an Application is a set of State Machines consisting of various States, Transitions from state to state, and Rules and Logic that constrain the transitions between states.
Abstract States represented by 3-Dimensional Tuples
tao.js expresses the Abstract States of an Application to represent distinct Application Contexts through the use of 3-Dimensional tuples. These tuples are referred to as trigrams because of their distinct structure defined by 3 specific aspects:
Term - the thing in the context - conceptually usually a domain entity
Action - the operation being performed on the thing in the context
Orient(ation) - the perspective of the interaction with the system at
the moment of this operation on this thing
Trigrams are formally defined in description and in code using distinct String
s for each aspect
making up a member of the Set.
An example trigram descriptor using set notation would be: {User, Find, Portal}
Translating this to code that executes with tao.js you will see it as either:
- an Object hash:
{ t: 'User', a: 'Find', o: 'Portal' }
OR - an Array of strict ordering based on the TAO acronym:
['User', 'Find', 'Portal']
Trigrams represent possible states of the application as a context that can be executed within the application.
AppCons are Actual States
tao.js expresses the Actual States of an Application through the use of AppCons, representing Application Contexts through which an Actor transitions while interacting with the Application.
AppCons differ from trigrams in that they can (not required) include associated data for any or all of the 3 aspects of the trigram.
This is most often expressed as an individual or list of Objects that represent the Term for
the given Context, but don't limit your thinking to attaching all individual AppCon data to
Terms alone. Distinct Actions can also be expressed with the Action's data, e.g. Find
could contain either an individual id
used to fetch the given Object representing the Term or a set of search criteria to get a list of Objects representing the Term. The same goes for Orient(ation)s
which it's often helpful to attach authorization, session or other data that distinguishes
individual Actual States of a given Orient(ation).
The "State" of an App is Complex
The "State" of an Appplication at any point is a complex combination of many varying factors.
The TAO captures this by breaking down individual portions of the State into constituent Application Contexts which:
- make it easier to reason about the State of an App
- allow rich interactions as reactions to the transitions of State reflecting the true representation of an App explicitly