Sequence diagrams allow you to model and visualize messages in your system, and you can see components that implement system functionality through component diagrams, as well as other system components such as Web services, user interfaces, and COM components.
A component diagram describes the relationship between different components of an application or system. Component diagrams show part of the software system design. These components can be executable programs, DLLs, or even the entire system. At this level, it is not necessary to have a very accurate understanding of what systems are to be built, but simply to break down the architecture into something that is easier to manage and understand. Component diagrams can be used to present high-level system structures and service behavior for component delivery and use.
Creating a component diagram can help the development team understand the existing design, discover possible improvements, and, more importantly, make the system a collection of components with good interfaces, enhancing the independence of the component, so that the design is easily changed when the requirements change.
Components have interfaces that can be functions that the component provides to other components (provided Interface) or functions that need to be obtained from other components (Required Interface). Required interface is represented by an unclosed circle, which becomes hook,provided interface with a closed circle representation, called Loolipop, which is connected with dependency elements.
It is easy to reposition the interface element within the component by dragging the interface element to the appropriate location.
Dependent elements are always connected from required Interface (hooks) to provided Interface (Lollipop).
Larger components can be made up of smaller components, so in a component diagram, you can also put one component inside another component.
A component that is within another component becomes a part. Like the characteristics of a normal class, a part can be considered a property of the parent component. Within the parent component, each part can define provided Interface and required Interface for its type.
Class diagrams describe the relationships between classes within an application or system and between classes. Different symbols represent different relationships, and this information is independent of the specific implementation of the class. The class diagram focuses on the logical structure of the class rather than the implementation of the class.
In a class diagram, a type can be a class, an interface, or an enumeration. You can define attributes for class and interface objects. An attribute is a value attached to a class or interface instance. You can also define operations for classes and interfaces, which are methods or functions that are executed by an instance of a class or interface.
The three standard types that can be used in class diagrams:
1. Classes are used to represent data or object types. Bookorder represents a class.
2. Color represents an enumeration that represents a type that contains a finite number of literals.
3. Ordering represents an interface that needs to be used when a pure interface must be distinguished from a specific class with an internal implementation.
Both classes and interfaces contain attributes and operations. Attributes are just a specified value for each instance of the type. An operation is a method or function to be executed by an instance of that type. The name of each type must be unique.
The enumeration contains a list of values called enumerations. Make sure that each enumeration value is unique when using enumerations. You can also assign a value to each of the enumeration values by setting value values in the Properties window.
Class diagrams can also display inheritance, dependency, and package information, which is another example of a class diagram:
Component diagram, Class diagram top-down design