Created January 1, 2011
Last updated January 1, 2011
[ Japanese | English ]

Entity class , Boundary class , Control class and other classes

  In the Object-oriented, the Entity class is the most basic. But, of course, there are other type classes.
  In this page , I will explain the Entity class in the BCE pattern 1. And , I will explain about other type classess ( for example, feature and so on ).
  In addition, I will explain easily the class 2 excluding the BCE pattern.

-----
Note.
1: If you don't know the BCE pattern , please search "BCE model" , "BCE pattern" or "robustness analysis" in the Google.
By the way, the "B" of the "BCE" means "Boundary" , the "C" means "Control" , the "E" means "Entity".
And , the "C" of the BCE pattern is not the "C" of the MVC pattern. Please pay attention.
2: The number of "Classes except the BCE pattern" cannot be counted.
Because , it is very a lot , and the type of class is defined freely by a designer 3.
Therefore, in this page , I explain only the classes that I know.
3: If you stady the UML , have you heard "Stereotype"?

1. What is the Entity Class ?
2. What is the Boundary Class ?
3. What is the Control Class ?
4. Classes except the BCE pattern
5. Merit in which class is separated like Entity and Boundary and Control classes, etc
6. About the direction of the Association and Dependency
7. Reference


1. What is the Entity Class ?

  The Entity class is a class that has datas.
  The "E" of the ER diagram means "Entity" too, if you know the ER diagram, you easily understand.
  (If you don't know the ER diagram , please read "Class diagram , Entity-relationship diagram and Extraction of the class - Dharma's Excel VBA".)

  The followings are the feature of the Entity class.
  1. There are many cases that this objects of this class are perpetuated 1 in the DB.
  2. The extraction of the class is like ER diagram 2.
  3. This class is related to the DOA (Data-oriented approach) 2.
  4. The module cohesion of this class is high 3, and is not easy to be changed.
  5. In a class diagram , there are cases that the stereotype (<<entity>>) is added.
  6. In a class diagram , there are cases that is shown by the following icon.

-----
Note.
1: The perpetuation means that data on memory is saved on a DB or file ( for example , text file , Excel book , XML , binary file and so on) not to disappear.
2: If you need details, please read "Class diagram , Entity-relationship diagram and Extraction of the class - Dharma's Excel VBA" and "Normalization of classes - Dharma's Excel VBA".
3: The high module cohesion is better. If you need details, please read "Object-oriented and the Module Cohesion and the Module Coupling - Dharma's Excel VBA".
Back to Top

2. What is the Boundary Class ?

  The Boundary class is a class that is the boundary of the system and other system or user ( which is actor in the use case diagram ).

  For example , the screen class , IF (file I/O , IDL of CORBA ...) class to cooperate other systems , the class to output data that is used by user and so on.

  The followings are the feature of the Boundary class.
  1. This class is more easy to be changed than the Entity and Control class.
  2. The attribute of this class and screen lyout are defined at the basic design.
  3. In a class diagram , there are cases that the stereotype (<<boundary>>) is added.
  4. In a class diagram , there are cases that is shown by the following icon.

Back to Top

3. What is the Control Class ?

  The followings are the feature of the Control class.
  1. This class has a few attribute.
  2. In a class diagram , there are cases that the stereotype (<<control>>) is added.
  3. This class is a class to achieves use cases in the Use case diagram.
  4. In a class diagram , there are cases that is shown by the following icon.

Back to Top

4. Classes except the BCE pattern

  I explain about the class excluding the BCE pattern.
  Here, I explain the class that is extracted when classifying it by the function of the class.
  I explain about not the class classified by difinition type ( for example the Abstract class , Concrete class 1 , Interface class and so on ) but the class classified by function.

  1. Utility class
      This class is a class like java.lang.Math.
      This class offers only static methods, and this class is not able to create instances.
      In a class diagram , there are cases that the stereotype 2 (<<utility>>) is added.
      In Excel VBA and VB6.0 , this class is defined by the standard module.

  2. DAO(Data Access Object) class
      This class is a class that access to DB.
      This class solves the Object-relational impedance mismatch.

  3. Other classes
      There are other classes by applying design pattern or the target of the system ( for example , embedded system ).
-----
1: It is opposite of the Abstract class. This class is able to create instances.
2: It is not a stereotype but it might be a key word possibly.
Back to Top

5. Merit in which class is separated like Entity and Boundary and Control classes, etc

  I eplain the merit in which class is separated like Entity and Boundary and Control classes, etc.
  Not separating is fewer programming source code than separating. Therefore, in only the programming process, not separating may be better. But, in the test process , separating is better.

  The followings are the merits in which class is separated.
  1. Because one class is small, the readability of the class is better. The module cohesion is too.

  2. It becomes easy to recycle.
      If the Boundary and Control are in one class, for example, when screen becomes unnecessary ( changing to batch process ) , the class are not be reused.

  3. The influence of the change by the specification change can be suppressed.
      Frequency in which the change is received is different in the Boundary, the Control, and the Entity. The possibility that the Entity receive changes most is low, and the Boundary is the highest.
      The influence when changing can be reduced by dividing a point where the possibility of the change is high and a low point.

  4. Separating becomes more testability.
      The test is not an end when doing once. There are a lot case that the Regression testing is done.
      Moreover, you should divide the part where the test is automated easily and the part not done easily.
Back to Top

6. About the direction of the Association and Dependency

  I explain about the direction of the Association and Dependency.
  When there are 2 classes, one class may use another class or may have an object of another class.

  Though it is natural, About the direction of the Association and Dependency
        Class that changes easily --> Class that doesn't change easily
is the best (The class that changes easily uses the class that doesn't change easily) .
  The change frequency of the Entity , Control and Boundary is :
  1. Boundary
  2. Control
  3. Entity

Therefore, the Entity must not use the Control class and must not have the object of the Control class.
If you need ... , please use Event 1 ( for example , in Java language , listener class ).

-----
1: In VBA ( Version 6 and more ) , Event statement is supported. If the version of the VBA is 5 , it is not supported.
In Java language, the Observer pattern is used.

Back to Top

7. Reference

  The following tables are pages that I referred to create this page.

No.

Linked Website Name

Description

Linked date

1 Object-oriented and the Module Cohesion and the Module Coupling - Dharma's Excel VBA To understand the object-oriented, the understanding of the Module Cohesion and the Module Coupling never failed. I will explain those. January 1, 2011


Prev Up Next  Top
Back to Top

I doesn't assume the responsibility of any damage that occurs because of the use of this page.

Microsoft ,Windows ,Visual Basic and Excel are registered trademarks of Microsoft Corporation in the United States and other countries.
Visual Basic® for Applications may represent a VBA.
Mac ,Mac OS ,Mac OS X ,AppleScript are trademarks of Apple Inc., registerd in the U.S. and other countries.
UML ,Unified Modeling Language and CORBA are trademarks of Object Management Group Inc. in the U.S. and other countries.
Sun, Sun Microsystems, Sun Microsystems Computer Corporation, the Sun logo, the Sun Microsystems Computer Corporation logo, Solaris, Java, JavaSoft, JavaScript, HotJava, JDK, and all Java-based trademarks or logos are trademarks or registered trademarks of Sun Microsystems, Inc.
Google is trademarks of Google Inc.
Other brands and their products are trademarks or registered trademarks of their respective holders and should be noted as such.

The author of this page and these companies do not have any relationship.