Entity-Boundary-Interactor (EBI) Flashcards
What is the role of an Entity?
The Entity objects hold the data used by the system and all the behaviour naturally coupled to this data. Each Entity object represents a concept relevant to the problem domain and wich holds identity and resilient (persistent) data
What is the role an Boundary?
All functionality dependent on the system environment (tools and delivery mechanisms) belongs in the Boundary objects.
Any interaction of the system with an actor goes through a Boundary object. As Jacobson describes, an actor can be a human user like a customer or an administrator (operator), but it might also be a non-human “user” like an alarm, a printer, or a third party API.
What is the role of Interactor?
The Interactor objects will hold behaviour not naturally tied to any of the other types of objects.
Sutch behaviour consists typically of operations over several Entities, culminating in returning some result to a boundary object.
This means that all behaviour that does not fit into a boundary or Entity will be placed in one or several control objects.
Therefore, Jacobson thinks of Control objects not only as the objects that orchestrate a use case but also as any object that has behaviour relevant for a use case but is not a Boundary nor an Entity.
Why 3 object types?
At that time, Jacobson says, other OO methodologies would put all of those responsibilities in the entity itself, however, he (and his collaborators) preferred segregating those responsibilities into 3 object types because it would make the system more adaptable to changes.
MVC vs EBI?
The EBI pattern is to the back-end what MVC is to the front-end. They are not an alternative to each other, they are complementary. If we would put them together in a single pattern we could call it something like View-Controller-Interactor-Entity.