This is related to the other thread I started, but since then I have clarified my thoughts more and I want to focus this thread specifically on my proposal to add the term "actor" to the DCI glossary.
In order to
explain why I think this is important, I want to first bring up
something mentioned in the Lean Architecture book: the distinction
between
user roles and
object roles.
User roles are
for the most part synonymous with UML actors (except in the case of
actors that aren't users, like an external system), whereas
object roles refer to objects playing roles in DCI code.
In a recent post on this group, Trygve said the following about the relationship between the terms "role" and "actor":
The word "role" comes from early 17th century: from obsolete French
roule "roll," referring originally to the roll of paper on which the
actor's part was written (Oxford). So a role is performed by an actor
(rolePlayer object, noun) who plays the role (roleMethods, verbs).
This definition of an actor as a rolePlayer is of course valid for DCI but has a different meaning than the term "actor" in UML.
Because use cases and actors (as defined in UML) are very relevant to
discussions of the DCI design process, this leads to an ambiguity: in
UML, "actor" refers to a
user role (or "external system role" as the case may be), whereas in discussions of DCI code, "actor" is often used to mean an
individual object playing a role (please correct me if I am mistaken in this).
Thus I think it's important for the term "actor" to be formally defined
for DCI, especially for people coming from a UML background. These two
meanings are quite different, and both come up frequently in DCI
discussions (as we have seen here).
Although I'm not the best person to write a formal definition, in the
interest of contributing what I can, I've drafted the following definition
as a starting point...I'm sure it will need
revision (it's long for one thing), but you have to
start somewhere, right?
Actor
Definition 1.
The first definition concerns the perspective of the system as a whole, as well as the users who interact with it.
1. An Actor is a role that interacts with the system, usually played by a
user of the system. An Actor can also be a role played by an external
system.
The term "role" in the above definition refers simply to the regular English-language meaning of the word "role."
However, it is also true that actors are commonly implemented as Roles in DCI code (but only if necessary for a given context).
Definition 2.
The second definition concerns the perspective of DCI code and the
objects in the computer's memory in a running system, in which these
objects should parallel the end users' and/or programmers' mental
models.
2. An Actor is an individual object that plays one or more Roles. Synonymous with "Role Player."
~~~
Looking at this definition I'm concerned that it might be more confusing
than helpful to newcomers, so please suggest improvements.
Perhaps one of these definitions should be preferred over another in
DCI, or perhaps some adjective could be used to distinguish them, but in any case I think the ambiguity should be addressed.
Personally I think it might be a good for the second definition to be discouraged, since we already have the term "Role Player", and because "Actor" is already defined in UML.