Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

In UML class diagrams, what are Boundary Classes, Control Classes, and Entity Classes?

I'm now using NetBeans as my IDE-of-choice, and it has a plugin for UML modeling. In the class diagram, there are model elements known as Boundary Class, Control Class, and Entity Class. However, I can't find a good definition of them, but I did find this site on UML Class Diagrams.

like image 470
Thomas Owens Avatar asked Mar 25 '09 22:03

Thomas Owens


People also ask

What are boundary control and entity classes?

The entity-control-boundary (ECB), or entity-boundary-control (EBC), or boundary-control-entity (BCE) is an architectural pattern used in use-case driven object-oriented software design that structures the classes composing a software according to their responsibilities in the use-case realization.

What is boundary class in UML?

A Boundary Class is a stereotype of a class that is specified in UML Extensions for Business Modeling. It can be shown as a regular class rectangle with stereotype of "boundary", or as the following special icon: Definition. A "boundary class" is a class that lies on the periphery of a system, but within it.

What is the difference between a boundary controller and entity class?

Entities are objects representing system data: Customer, Transaction, Cart, etc. Boundaries are objects that interface with system actors: user interfaces, gateways, proxies, etc. Controllers are objects that mediate between boundaries and entities. They orchestrate the execution of commands coming from the boundary.

What is entity class in class diagram?

Entity classes represent real-world items, such as people, things, and so on. Entity classes are the entities represented on an entity-relationship diagram. CASE tools such as Visible Analyst will allow you to create a UML entity class from an entity on an E-R diagram.


1 Answers

Robustness diagrams are written after use cases and before class diagrams. They help to identify the roles of use case steps. You can use them to ensure your use cases are sufficiently robust to represent usage requirements for the system you're building.

They involve:

  1. Actors
  2. Use Cases
  3. Entities
  4. Boundaries
  5. Controls

Whereas the Model-View-Controller pattern is used for user interfaces, the Entity-Control-Boundary Pattern (ECB) is used for systems. The following aspects of ECB can be likened to an abstract version of MVC, if that's helpful:

UML notation

Entities (model)
Objects representing system data, often from the domain model.

Boundaries (view/service collaborator)
Objects that interface with system actors (e.g. a user or external service). Windows, screens and menus are examples of boundaries that interface with users.

Controls (controller)
Objects that mediate between boundaries and entities. These serve as the glue between boundary elements and entity elements, implementing the logic required to manage the various elements and their interactions. It is important to understand that you may decide to implement controllers within your design as something other than objects – many controllers are simple enough to be implemented as a method of an entity or boundary class for example.

Four rules apply to their communication:

  1. Actors can only talk to boundary objects.
  2. Boundary objects can only talk to controllers and actors.
  3. Entity objects can only talk to controllers.
  4. Controllers can talk to boundary objects and entity objects, and to other controllers, but not to actors

Communication allowed:

         Entity    Boundary   Control Entity     X                     X Boundary                         X Control    X          X          X 
like image 58
Pup Avatar answered Sep 29 '22 19:09

Pup