What is a
component?
From use cases to sequence
diagrams and now component diagrams, no doubt you have already gathered that we
have implementation on our mind. There
is a fundamental difference between component diagrams and the other two types
though. That is to say that use case and
sequence diagrams are referred to as behavioural diagrams in UML and in the
same family of diagrams as activity or collaboration diagrams. In contrast component diagrams are termed
structural in the same category as class and object diagrams.
This is the kind of
diagram that models the actual software components that are to enable use
cases. By software component we mean an
executable file or a source file. A file
containing code that can be saved to memory and ultimately placed on the
client, or on the Web server hardware, or even on an
application server hardware is hereby referred to as a component. Other objects like resource files and
documents are also referred to as components but we are going to concentrate on
software code.
Strictly speaking we are
talking about one set of components for one use case realisation. Diagram depicts the relationship between the
software components. It should also
demonstrate the location of the components, communication between the
components, and their dependencies.
Examples of components
could be HTML documents, JSP and ASP scripts, database, etc. So based on the choice of technology,
software architect models solution components as Enterprise JavaBeans (EJBs),
Component Object Model/Distributed Component Object Model (COM/DCOM)
components. These are industry standard
component models that solution could be based on. Reusability is the major driving factor for
implementing components based on these standards use to their extensive use.