"Design Mode Design Pattern" reading notes

xiaoxiao2021-03-06  47

"Design Mode Design Pattern" reading notebook notes The symbols used by the book "Design Pattern" This book uses some informal pictures to indicate their own thoughts, but in the design model When the relationship between the class / object is used, the specification is used. Maybe my book is more old? It is not based on UML based on UML, but is based on UML. Class Diagram, Object Diagram Based on OMT, Interaction Diagram Based on Objectory and Booch. Moreover, the author makes a simplification and some changes based on their own needs. I feel very simple and practical. It feels that this simplified version is not a good practice relative to the various complicated norms of UML. There are three main maps: Class diagram: Indicate contact object diagram representing the structure of the class and the class: indicating the structure of a specific object Run-Time: the dynamic relationship class diagram indicating the mutual sending request between the object (Class Diagram) 1, rectangular; use horizontal line to class name, main operation (Operation), three parts of the main member variable (Instance variable); the class name uses black body. 2, type (TYPE) is optional; if needed, place the operation, member variable, front of the parameter. 3. If the class / this operation is a virtual (Abstract), it is represented by a slash.

4, two client: a, participant This client is a part of the model. In the mode, a certain responsibility B, Implicit use gray, this client does not really belong to a part of the mode, just to indicate which member in the mode Need to interact with the client, add this implied client5, relationship between classes: A, inheritance, indicate B, aggregation with the solid line with hollow triangle (pointing to the parent class) Diamond (aggressor), solid line with arrow (pointing to the aggregator) represents C, reference (acquaintance / reference) with a solid line with arrows (pointing to the referenced), creating (create) Without diamonds, the dotted line (pointing to the creator) indicates that E, more Than ONE When more than 1 of the aggregated / referenced objects, add a solid round F, pseudococode in front of the arrow, Pseudocode Note to indicate 6, the object diagram (Object Diagram) 1, the object name is expressed in the form of "asomething", where Something represents the name of the class of the object, with a rectangular shape with arc; divided into a target name with the horizontal line. Other references two parts, the relationship between objects: reference (Reference), indicate 4, the example interaction diagram (Interaction Diagram) with an arrow (pointing to the referenced), the interactive Diagram 1 2. From the top to bottom, the naming rule is the same as the object map, indicating that 3, the solid vertical line indicates the life period of the object 4, before the object is created, its vertical line is used by dotted line Indicates 5, the vertical rectangular representation object is an active, that is, it is processing a request 6, the transmission request is represented by the line with the horizontal arrow (pointing receiver); if the request It means that an object is created, then it is shown to be dashed, otherwise it means to be a solid line. 7. Examples Other in OMT / UML, in the class diagram, there is a relationship between the class between the classes, expressed in a solid line without arrows. This is a bidirectional relationship. Although Association is appropriate in the analysis phase, it seems high-level in the design (Design) phase, because in the design phase, the relationship of Association maps into reference (Pointer). The reference / pointer is the direction of the band, which is obviously more suitable in the design phase.

转载请注明原文地址:https://www.9cbs.com/read-112660.html

New Post(0)