-There's two more structural diagrams that I want to - -2
-mention before we move to the behavioral ones. The - -3
-first one's the component diagram. A component diagram is - -4
-a static view of components in a system and of - -5
-their relationships. More precisely, a node in a component - -6
-diagram represents a component where a component consists of one - -7
-or more classes with a well-defined interface. Edges conversely - -8
-indicate relationships between the components. You can read this relationship - -9
-as component A uses services of component B. And notice that the - -10
-component diagrams can be used to represent an architecture, which is - -11
-a topic that we will cover extensively in the next mini-course. - -12
-So let's illustrate this with an example. So, what I'm representing - -13
-here is a component diagram for our example system, the course - -14
-management system. And as you can see, it's slightly more complex - -15
-than the other diagrams that we saw. But there's really no - -16
-need to go through all the steps and all the details. - -17
-Important thing is to point out some key aspects of - -18
-this diagram. So the first one is that these rectangular - -19
-nodes are the nodes in the system, so are my - -20
-components. For example, student is a component, schedule is a component, - -21
-and so on. And as far as edges are concerned, - -22
-I'm representing two kinds of edges. The first kind of dashed - -23
-edges which were part of the original uml definition and - -24
-indicate use. So an edge, for example, between this compnent and - -25
-this compnent indicated that the seminar management uses the - -26
-facilities component. More recently, in UML two, a richer representation - -27
-was introduced, which is the one that I'm also showing - -28
-here. So if we look at this part of the - -29
-diagram, you can see this sort of you now, - -30
-lollipop socket representation. And in this case, what this represents, - -31
-is that a lollipop indicates a provided interface. So an - -32
-interface that is provided by the component. So, for example, - -33
-this security component provides encryption capabilities. The socket, - -34
-conversely, indicates a required interface. So, for example, in - -35
-this case, it's saying that the facilities component - -36
-is needing access control capabilities, which, by the way, - -37
-is provided by the security component. So in - -38
-a sense these sockets and lollipop indicate interfaces between - -39
-a provider of some of functionality, and the client - -40
-of that functionality and you can look at those - -41
-as basically APIs. So sets of methods that - -42
-provide a given functionality. To give you another - -43
-example, if we look at the persistence components - -44
-the persistence component provides, unsurprisingly, persistent services. And - -45
-those persistent services are required by several other - -46
-components in the system. And in turn, the persistent - -47
-components relies on the University database component to - -48
-provide such services. So, there's the University DB components - -49
-provide these sort of low-level database services that are used - -50
-by the persistence component To in turn provided services. Last thing - -51
-I want to note is that components or relationships can be - -52
-annotated, so, for example if we look at the seminar management - -53
-and the student administration components you can see that they - -54
-are annotated here to indicate that they are user inferfaces. So - -55
-that's all I wanted to say on the component diagrams, but - -56
-again the key piece of information is that they represent components - -57
-in the system where a component consists of one or more classes indicate the - -58
-interfaces that these components provide or require. - -59
-and describe the interactions between these components. -- cgit 1.4.1