User Tools

Site Tools


can_roles_be_unbound_in_a_context

Can Roles be unbound in a Context?

All Roles should be bound as an atomic operation before an Interaction starts, which leaves no place for unbound Roles. If you run into that problem, it could be a sign that the scope of the Context is too large, or other problems with the underlying mental model.

Note the difference between “unbound Roles” and “Roles set to null”. Setting a field that identifies a Role to null is allowed if your language supports it, be aware though that it can complicate things, forcing null checks throughout the Context.

Also note that the Roles can all be rebound before another Interaction in the same Context occurs.

can_roles_be_unbound_in_a_context.txt · Last modified: 2014/02/03 15:41 by gazoot