unit 5-modeling component design

Upload: asif-shaikh

Post on 09-Apr-2018

228 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/8/2019 Unit 5-Modeling Component Design

    1/27

    UnitUnit 88

    Deployment DiagramDeployment Diagram

  • 8/8/2019 Unit 5-Modeling Component Design

    2/27

    Implementation DiagramImplementation Diagram

    It show the implementation phase of systemIt show the implementation phase of system

    development such as the source code structuredevelopment such as the source code structure

    and the run time implementation structureand the run time implementation structure It is high level diagram also called as physicalIt is high level diagram also called as physical

    diagramdiagram

    Two types:Two types:--

    Component diagramComponent diagram

    Deployment diagramDeployment diagram

  • 8/8/2019 Unit 5-Modeling Component Design

    3/27

    Component DiagramComponent Diagram

    It model the physical components such asIt model the physical components such asexecutables, libraries, tables, files andexecutables, libraries, tables, files anddocuments.documents.

    A Component represents the physical packagingA Component represents the physical packagingof logical elements, such as classes, interfaces,of logical elements, such as classes, interfaces,and collaborations.and collaborations.

    Logical modeling help to visualize, specify, andLogical modeling help to visualize, specify, anddocument the collaborations. Physical modelingdocument the collaborations. Physical modelingis used to construct the executable system.is used to construct the executable system.

  • 8/8/2019 Unit 5-Modeling Component Design

    4/27

    Component DiagramComponent Diagram

    In the UML, all these physical things are modeled asIn the UML, all these physical things are modeled ascomponents. A component is a physical thing thatcomponents. A component is a physical thing thatconforms to and realizes a set of interfaces, thusconforms to and realizes a set of interfaces, thus

    interfaces bridge logical and physical models.interfaces bridge logical and physical models. You also can have file components that represent theYou also can have file components that represent the

    source code files of an application or document filessource code files of an application or document filesthat represent, for example, the user interface files suchthat represent, for example, the user interface files such

    as HTML or JSP files.as HTML or JSP files. Finally, you can use components to represent even theFinally, you can use components to represent even the

    database tables of a system as well!database tables of a system as well!

  • 8/8/2019 Unit 5-Modeling Component Design

    5/27

    ElementsElements

    Component:Component:The objects interacting with eachThe objects interacting with each

    other in the system. Depicted by a rectangle withother in the system. Depicted by a rectangle with

    the name of the object in it, preceded by a colonthe name of the object in it, preceded by a colonand underlined.and underlined.

  • 8/8/2019 Unit 5-Modeling Component Design

    6/27

    I

    nterfaceI

    nterface It is a collection of operations that specify aIt is a collection of operations that specify a

    service that is provided by or requested from aservice that is provided by or requested from a

    class or component.class or component.

    Name

    methods

  • 8/8/2019 Unit 5-Modeling Component Design

    7/27

    PortPort

    A Port is a specific window into an encapsulatedA Port is a specific window into an encapsulatedcomponent accepting messages to and from thecomponent accepting messages to and from thecomponent conforming to specified interface.component conforming to specified interface.

    Ports can support unidirectional communication or biPorts can support unidirectional communication or bi--directional communication.directional communication.

  • 8/8/2019 Unit 5-Modeling Component Design

    8/27

    RelationshipRelationship

    R

    elation/AssociationR

    elation/Association: Similar to the: Similar to therelation/association used in class diagramsrelation/association used in class diagrams

    (dependency) (Realization)(dependency) (Realization)

  • 8/8/2019 Unit 5-Modeling Component Design

    9/27

    Uses ofComponent diagramUses ofComponent diagram

    Modeling Source CodeModeling Source Code: In application, we organize the files: In application, we organize the files

    into larger groups. Sometimes we update some files or createinto larger groups. Sometimes we update some files or createnew version of file. Component diagrams help to visualizenew version of file. Component diagrams help to visualizethese source code files and their relationships.these source code files and their relationships.

  • 8/8/2019 Unit 5-Modeling Component Design

    10/27

  • 8/8/2019 Unit 5-Modeling Component Design

    11/27

    Modeling physical databasesModeling physical databases: Mapping a logical: Mapping a logicaldatabase schema to a relational database is not so simple.database schema to a relational database is not so simple.

    In presence of inheritance decisions should be made aboutIn presence of inheritance decisions should be made abouthow to map classes to tables.how to map classes to tables.

    Define a separate table for each classDefine a separate table for each class

    Collapse inheritance lattices so that all instances of anyCollapse inheritance lattices so that all instances of anyclass in a hierarchy have the same stateclass in a hierarchy have the same state

    Separate parent and child states into different tablesSeparate parent and child states into different tables

  • 8/8/2019 Unit 5-Modeling Component Design

    12/27

    Modeling adaptable systemsModeling adaptable systems: sometimes due to: sometimes due to

    complex operations the database is separated oncomplex operations the database is separated ondifferent servers.different servers.

  • 8/8/2019 Unit 5-Modeling Component Design

    13/27

  • 8/8/2019 Unit 5-Modeling Component Design

    14/27

    Deployment DiagramDeployment Diagram

    The deployment diagram captures the configurationThe deployment diagram captures the configurationof the runtime elements of the application.of the runtime elements of the application.

    It shows the topology of processors and devices onIt shows the topology of processors and devices on

    which the software executes.which the software executes.With UML, we use deployment diagrams toWith UML, we use deployment diagrams to

    visualize the static aspect of the physical nodes andvisualize the static aspect of the physical nodes and

    their relationships and to specify their details fortheir relationships and to specify their details forconstruction.construction.

    It shows allocation of processes to processors inIt shows allocation of processes to processors in

    physical design, thus known as process diagram.physical design, thus known as process diagram.

  • 8/8/2019 Unit 5-Modeling Component Design

    15/27

    ElementsElements

    ProcessorProcessor::-- Hardware capable of executingHardware capable of executingprograms. It is represented as shaded cube with aprograms. It is represented as shaded cube with a

    name of the object. It can have list of processes onname of the object. It can have list of processes onit.it.

    DeviceDevice::-- hardware helping in execution ofhardware helping in execution of

    applicationsapplications

    Production

    Server

    Modem

  • 8/8/2019 Unit 5-Modeling Component Design

    16/27

    Connection:Connection:-- similar to the relation/associationsimilar to the relation/association

    used in class diagrams to define theused in class diagrams to define theinterconnection between nodes.interconnection between nodes.

    Deployment diagram addresses the distribution,Deployment diagram addresses the distribution,delivery, and installation of the parts that makedelivery, and installation of the parts that makeup the physical system.up the physical system.

  • 8/8/2019 Unit 5-Modeling Component Design

    17/27

  • 8/8/2019 Unit 5-Modeling Component Design

    18/27

    Common UsesCommon Uses

    Model Embedded systemsModel Embedded systems::-- EmbeddedEmbedded

    systems involve software that controls devicessystems involve software that controls devicessuch as motors, actuators, and displays and issuch as motors, actuators, and displays and is

    controlled by external stimuli (sensor input,controlled by external stimuli (sensor input,movement, temperature changes). Deploymentmovement, temperature changes). Deployment

    diagram can be used to model the devices anddiagram can be used to model the devices and

    processors that comprise an embedded system.processors that comprise an embedded system.Thus, we should consider project hardware andThus, we should consider project hardware and

    software groups interaction.software groups interaction.

  • 8/8/2019 Unit 5-Modeling Component Design

    19/27

  • 8/8/2019 Unit 5-Modeling Component Design

    20/27

    Model Client/Server systemModel Client/Server system::-- A client/serverA client/serversystem focus on making clear separation betweensystem focus on making clear separation between

    the systems user interface and the systemsthe systems user interface and the systems

    persistent data. We should decide about thepersistent data. We should decide about thenetwork connectivity of clients to servers andnetwork connectivity of clients to servers and

    about the physical distribution of softwareabout the physical distribution of softwarecomponents across the nodes.components across the nodes.

  • 8/8/2019 Unit 5-Modeling Component Design

    21/27

    Model fully distributed systemModel fully distributed system::-- They areThey arewidely distributed encompassing multiple levelswidely distributed encompassing multiple levels

    of servers. Nodes can be added or deleted as perof servers. Nodes can be added or deleted as per

    requirement.requirement.

  • 8/8/2019 Unit 5-Modeling Component Design

    22/27

  • 8/8/2019 Unit 5-Modeling Component Design

    23/27

  • 8/8/2019 Unit 5-Modeling Component Design

    24/27

  • 8/8/2019 Unit 5-Modeling Component Design

    25/27

  • 8/8/2019 Unit 5-Modeling Component Design

    26/27

  • 8/8/2019 Unit 5-Modeling Component Design

    27/27