Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

10 component diagram

component diagram

  • Login to see the comments

10 component diagram

  1. 1. UNIT I UML DIAGRAMS Introduction to OOAD – Unified Process – UML diagrams – Use Case – Class Diagrams– Interaction Diagrams – State Diagrams – Activity Diagrams – Package, component and Deployment Diagrams.
  2. 2. Component Diagram Shows the various components in a system and their dependencies A component represents a modular, deployable, and replaceable part of a system that encapsulates implementation and exposes a set of interfaces
  3. 3. Overview • Component diagrams are used to model physical aspects of a system • Physical aspects are the elements like executables, libraries, packages, files, documents etc which resides in a node. • A component diagram – Shows the various components in a system and their dependencies.
  4. 4. Purpose • Purpose of the component diagram can be summarized as: 1. Visualize the components of a system. 2. Construct executables by using forward and reverse engineering. 3. Describe the organization and relationships of the components. • A single component diagram cannot represent the entire system – But a collection of diagrams are used to represent the whole. • This diagrams are used during the implementation phase of an application. – But it is prepared well in advance to visualize the implementation details.
  5. 5. Usage of Component Diagram • Model the components of a system. • Model database schema. • Model executables of an application. • Model system's source code.
  6. 6. How to draw Component Diagram? • Before drawing a component diagram the following artifacts are to be identified clearly: 1. Files used in the system. 2. Libraries and other objects relevant to the application. 3. Relationships among the objects. • After identifying the objects the following points needs to be followed: 1. Use meaningful name to identify the component to which diagram is drawn. 2. Prepare a mental layout before producing using tools. 3. Use notes for clarifying important points.
  7. 7. Notations - Component • A component represents a physical module of code. • Component : A modular unit with well-defined interfaces that is replaceable within its environment – fosters reuse – Stresses interfaces • Graphical representation: special kind of class
  8. 8. Nodes and Edges • Following nodes & edges are typically drawn in a component diagram: – component, – interface, – provided interface, – required interface, – class, – port, – connector, – artifact, – component realization, – dependency, – usage.
  9. 9. Components with Ports • Port represents a service or behavior that a component requires. • Ports may specify inputs and outputs as they can operate bi-directionally. • A component with a port for online services – Along with two provided interfaces order entry and tracking – Required interface payment. lollipop notation socket notatio small squares
  10. 10. Assembly Connector • Assembly connector – Bridges a component’s required interface (Component1) with the provided interface of another component (Component2); • This allows one component to provide the services that another component requires.
  11. 11. Views • Two views: (i) Black-box (ii) White-box • Black-box view: interfaces provided and required only • White-box view: structure of interfaces and/or internal structure
  12. 12. Nested components • Components can be contained in other components • Interfaces can then be delegated through ports
  13. 13. Component Diagram for Bank Transaction
  14. 14. Major elements of UML component diagram component, provided interface, required interface, port, connectors.