Radical Object-Orientation #0C: The Internal Structure of an Object
Actions as the creators of behavior
Objects are linked by their input and output ports, forming their external structure or surface.
But what about their internal makeup? It's essential because an object needs a mechanism to ensure that an input message on a specific port results in an output message on a particular other. The ports for receiving and sending messages must be interconnected somehow, or else it's unclear whether an input will lead to the expected output. 🧐🤷
I suggest that the inner structure consists of various activities. While an object is generally seen as a "thing" represented by a noun, its components are actions, represented by verbs. All actions are of course transformations of some kind.

By labeling input ports with the actions they're linked to, it becomes simpler for integrations to direct messages appropriately.
And what about the output ports? Given that actions are expected to produce results (output messages), naming the output ports after the connected actions or the results they emit makes sense. This is straightforward when there's just one action involved, but multiple actions may require names based on the type of messages or results they release.
When an object performs an activity, it triggers a sequence of events internally. The output ports communicate these events to the outside world, indicating the completion of an activity or the production of a specific message.
Despite objects being autonomous according to the Principle of Mutual Oblivion (PoMO), their messages and ports evolve or are designed in tandem. Objects aim to be collaborative, not self-centered, and thus their interface is also shaped by the collective needs of other objects around them. Finding a balance between meeting others' needs and maintaining one's "authenticity" is key.
Objects form the building blocks of software in both mainstream and Radical Object-Orientation. However, Radical Object-Orientation further posits that these object compositions are essentially data flows at varying levels of abstraction.
And now Radical Object-Orientation introduces the idea that:
Objects are constituted by actions that connect input and output ports, potentially sharing state.
Unlike integrations, this structural approach to objects isn't about composition! The actions within an object don't combine to form larger actions; they're merely grouped together based on similarity. While composition integrates dissimilar elements into a cohesive whole by focusing on the connections, aggregation groups similar elements by simply collecting them.
The actions under an object's umbrella share commonalities, such as purpose or resource use, making it logical to aggregate them. In contrast, the objects within an integration share less, highlighting their value for cooperation in data flow processes (division of labor).
This leads us to a pivotal question: Radical Object-Orientation began with a focus on "things," denoted by nouns, and has evolved to emphasize actions, denoted by verbs, where the real behavior of code is created. So, why the initial focus on objects? Perhaps Radical Object-Orientation might be more aptly termed action-orientation? 😳😵







At first glance i was impressed by this idea,
but by now i alwas see this:
public class Calculator
{
/* onSummed */ public int Sum(List<int> numbers)
{
return numbers.Sum();
}
/* onAveraged */ public int Average(List<int> numbers)
{
return (int)numbers.Average();
}
}