Sie sind auf Seite 1von 37

7/21/12

KIT2 OOAD-UML-II

Chapter 9
Understanding Software Architecture
The design of a software system should represent its software architecture. Software architecture depicts all the components of a software system and the relationships between these components. This helps a developer to visualize all the software components of the system. In addition, it helps the developer to identify the hardware on which these components need to be deployed. UML provides various diagrams that help depict the software architecture of a system. This chapter explains how to depict the architecture of a software system by using various types of UML diagrams, such as package, component, and deployment.

Objectives
In this chapter, you will learn to: Create package diagrams Create component diagrams Create deployment diagrams

Introducing Architectural Modeling


Developing the design of a software system not only involves depicting the logical constituents, such as classes, objects, and interfaces but also depicting how the logical constituents are implemented in the system. The logical constituents are implemented to form the physical system that consists of components and nodes. A component realizes the static constituents of the system through a set of interfaces. A node typically represents a processor or a device on which a component is deployed. Architectural modeling enables you to visualize the physical distribution of components over the network of the organization. You need to model the architecture of a software system to determine if the design of components meets the requirements of the software system. To model the architecture of a software system, you can create the following diagrams: Package diagram: Depicts the constituents of a software system grouped together based on a specific criteria. Component diagram: Depicts the executable constituents of a software system. Deployment diagram: Depicts the various processing devices on which the component of the software system executes.

Creating Package Diagramsrams


You can create package diagrams to depict the various packages of a software system and the
www.niitstudent.com/india/Content/063OUML2S1/OEBPS/07_ch09.htm 1/37

7/21/12

KIT2 OOAD-UML-II

relationships among them. Packages enable you to organize the following constituents into logical groups: Use cases Classes Objects Interfaces Collaborations Components Applications Subsystems UML diagrams

Note

An application represents a complete software system that contains constituents, such as classes, components, and libraries. The application can be logically partitioned into subsystems. Note that a subsystem is a logical unit of software system that can be implemented independently.

The constituents of software system need to be grouped so that each constituent is declared in only one package. In addition, there is a composite relationship between a package and its constituents. This means that if the package is destroyed, then the constituents contained in the package are also destroyed. In addition, a package may contain another package. The package is represented as a rectangular structure that resembles a folder. You need to assign a name to a package that uniquely identifies it. You may simply give a name to a package without including the content of the package. The following figure shows the O r d e rP a r t spackage and its contents.

The preceding figure shows the O r d e rP a r t spackage for the Inventory Management System (IMS) that includes the O r d e rand P a r t sclasses. The O r d e rP a r t spackage groups the classes that collaborate to generate the order for spare parts. The O r d e rclass generates an order for a specific spare part, the details of which are accessed from the attributes of the P a r t sclass.
www.niitstudent.com/india/Content/063OUML2S1/OEBPS/07_ch09.htm 2/37

7/21/12

KIT2 OOAD-UML-II

It is beneficial to use packages to model the constituents of a software system because packages: Enable you to visualize the functional groups and the relationship among them. For example, in the IMS, you can create a package of the constituents that establish connectivity between the software system and the database accessed by the software system. You can create another package of the constituents, which updates data in the database. Enable easy management of large software systems. You can have constituents with the same name in different packages. This resolves the problem of assigning unique names to constituents. In other words, any constituent can be uniquely identified by a combination of the package name and the constituent name. For example, in the IMS, you may have two classes with the same name, Calculator, belonging to different packages, such as Accounting and Bill Processing.

Identifying Mechanisms to Package Use Cases


You can group use cases of a software system into packages based on the following rules: Group related use cases. For example, in the IMS, the use cases can be G e n e r a t eT e n d e r , A c c e p tQ u o t a t i o n ,P l a c eO r d e r ,P r o c e s sO r d e r , and G e n e r a t eB i l l . The G e n e r a t eT e n d e r and A c c e p tQ u o t a t i o n use cases are related to the tender and, for this reason, you can group the use cases into the T e n d e rpackage. Similarly, the P l a c eO r d e r and P r o c e s sO r d e r use cases are related to acquiring spare parts and, for this reason, you can group the use cases into the O r d e rpackage. The following figure shows the packages for the IMS.

In the preceding figure, the I n v e n t o r yM a n a g e r is the actor who uses the use cases contained in the two packages. Group use cases based on the actors that use them. For example, in the IMS, the I n v e n t o r y M a n a g e ris an actor who uses the G e n e r a t eT e n d e r ,A c c e p tQ u o t a t i o n ,P l a c eO r d e r ,
www.niitstudent.com/india/Content/063OUML2S1/OEBPS/07_ch09.htm 3/37

7/21/12

KIT2 OOAD-UML-II

and P r o c e s sO r d e r use cases. The A c c o u n tM a n a g e r is an actor who uses the P r o c e s s B i l l use case. As a result, you can have two packages, Inventory containing the use cases used by the I n v e n t o r yM a n a g e r and A c c o u n t s containing the use cases used by the A c c o u n tM a n a g e r . The following figure shows the use cases packaged according to the actors that use them.

Identifying Mechanisms to Package Classes


You can group the classes of a software system into packages based on the following criteria: 1. Package the classes that belong to the same inheritance hierarchy. For example, in the IMS, the A u t o m o b i l e P a r t sand E l e c t r o n i c P a r t sclasses are inherited from the P a r t sclass. For this reason, the two classes can be grouped in the P a r t spackage, as shown in the following figure.

www.niitstudent.com/india/Content/063OUML2S1/OEBPS/07_ch09.htm

4/37

7/21/12

KIT2 OOAD-UML-II

2. Package the classes that are related through a composition relationship. For example, in the IMS, each spare part has a specification associated with it. A specification includes details such as the thickness, material, weight, and diameter of the spare part. The P a r t sclass includes the P a r t S p e c i f i c a t i o nclass as an attribute. As a result, the P a r t sand P a r t s S p e c i f i c a t i o nclasses share a composition relationship and can be grouped together in the P a r t D e t a i l spackage, as shown in the following figure.

3. Package the classes that collaborate and interact with each other to realize use cases. For example, in the IMS, the S u p p l i e rand O r d e r classes collaborate to realize the P r o c e s s O r d e r use case. The collaboration between the S u p p l i e r and O r d e rclasses occurs because the s u b m i t O r d e rmethod of the s u p p l i e robject invokes the a c c e p t O r d e r method of the o r d e robject at run time. The s u b m i t O r d e rmethod of the s u p p l i e r class provides the details of the parts that are submitted against a specified order, to the O r d e r class as parameters. The a c c e p t O r d e rmethod processes the details of the order such as validating if the spare parts are supplied against the correct order number. The O r d e rclass
www.niitstudent.com/india/Content/063OUML2S1/OEBPS/07_ch09.htm 5/37

7/21/12

KIT2 OOAD-UML-II

also stores the details of the number of parts accepted and rejected in the database. For this reason, the S u p p l i e r and O r d e rclasses are grouped in the O r d e r S u b m i s s i o npackage, as shown in the following figure.

Visibility of the Constituents Contained in Packages


Packaging constituents enables you to decide whether or not a constituent of a package is visible to the constituents of other packages. You can prefix an element with a visibility symbol to specify the visibility of the constituent. The various symbols used to set the visibility of constituents are: +: Indicates that the constituent is public and, as a result, is accessible to the constituents of other packages. #: Indicates that the constituent is protected and, as a result, is accessible to the constituents that inherit it. -: Indicates that the constituent is private and, as a result, is not accessible to the constituents outside the package.

Relationships among Packages


The packages that you create for a software system are related to each other in different ways. The two types of relationships among packages can be: Access dependency Generalization

Access Dependency Relationship


An access dependency relationship among packages occurs when the constituents of one package need to access the constituents of another package to implement a particular function. The constituents of one
www.niitstudent.com/india/Content/063OUML2S1/OEBPS/07_ch09.htm 6/37

7/21/12

KIT2 OOAD-UML-II

package can access the constituents of another package by importing the package. For example, if class A belongs to a package, pack1, and class B belongs to a package, pack2, then class A can invoke the methods of class B by importing the package, pack2. You can access only the public constituents of the imported package, which in this case is pack2. The public constituents of a package are called exports. Consider another example. In the IMS, the Tender class of the Tender package accesses the TenderRules and SupplierSelectionRules classes of the TenderPolicy package. The Tender class requests for the details of the tender agreement from the TenderRules class. The Tender class also requests for the supplier selection criteria from SupplierSelectionRules class. In this case, the Tender package is referred to as the client package and the TenderPolicy package is referred to as the supplier package. The access dependency relationship is depicted by using a dashed arrow connecting the client package to the supplier package. The following figure depicts the access dependency relationship between the T e n d e r and T e n d e r P o l i c y packages.

www.niitstudent.com/india/Content/063OUML2S1/OEBPS/07_ch09.htm

7/37

7/21/12

KIT2 OOAD-UML-II

Generalization Relationship
A generalization relationship exists between a general package and the specific package derived from the general package. A specific package inherits the attributes of a general package. For example, in the IMS, you may have a general package for depicting the spare parts and specific packages for depicting the types of spare parts. The following figure shows the generalization relationship among the general package, s p a r ep a r t s , and the specific packages, a u t o m o b i l es p a r ep a r t s and e l e c t r o n i cs p a r ep a r t s .

Depicting the Package Diagrams for the IMS Diagrams for the IMS
You can depict all the packages that are contained in the IMS by using a single package diagram. The various packages in IMS are: Tender package : Contains the Tender class and Tender Database table.
www.niitstudent.com/india/Content/063OUML2S1/OEBPS/07_ch09.htm 8/37

7/21/12

KIT2 OOAD-UML-II

Order package : Contains the Order class and Order Database table. Supplier package : Contains the Supplier class and Supplier Database table. Parts package : Contains the Parts, PartSpecification, ElectronicParts, AutomobileParts classes and Parts database table. TenderPolicy package : Contains the TenderRules class and SupplierSelectionRules class. The T e n d e rpackage imports the T e n d e r P o l i c ypackage because the T e n d e rClass requires the classes of the T e n d e r P o l i c ypackage. The T e n d e rand O r d e rpackages are dependent on the S u p p l i e rand P a r t sclasses contained in the S u p p l i e r and P a r t spackages respectively. The following package diagram depicts the various packages and the relationships among the packages for the IMS.

Creating Component Diagramsagrams


Components provide the realization of a set of interfaces and form the executable parts of a software system. Examples of components can be an executable file, a COM+ component, or an Enterprise Java Bean (EJB) or a .NET component. You can model the following types of components to form a complete
www.niitstudent.com/india/Content/063OUML2S1/OEBPS/07_ch09.htm 9/37

7/21/12

KIT2 OOAD-UML-II

software system: Deployment components : Includes the components that form the executable system. For example, Dynamic Link Libraries (DLLs) and Executables (EXEs) are deployment components that enable you to execute a system. Work product components : Includes the components that are the outcome of the implementation phase of the SDLC. For example, the source code files and data files can be depicted as crucial components of the software system. Execution components : Includes the components that are created when a system is executing. For example, COM+ objects are instances of DLLs that are created at runtime. You can depict the COM+ objects as components. In UML, you represent a component as a rectangle with tabs. Each component has a name that identifies it. You can also depict the content of the component. The following figure shows the P r o c e s s O r d e r component and its details.

The preceding figure shows a component named P r o c e s s O r d e rthat provides realization of the interfaces, i O r d e r S u b m i s s i o n and i O r d e r A c c e p t a n c e .

Note

If there are a large number of components in a software system, you can organize them by grouping the related components into packages. You can also depict the dependency, generalization, realization, and association relationships among components.

Relationships among Among Components, Classes, and Interfaces


A component realizes a set of interfaces in which each interface specifies the functions offered by a class. A component is a stand-alone piece of software because it performs a complete function and does not require the services of other components. A class represents a real world entity and contains the code for implementing behavior that is specific to the entity that the class represents. Like a component, a class can realize a set of interfaces. Notice that, a class may just implement a part of a function and not the complete function required in a software system. A class
www.niitstudent.com/india/Content/063OUML2S1/OEBPS/07_ch09.htm 10/37

7/21/12

KIT2 OOAD-UML-II

collaborates with other classes to implement a specific function. You can model the various classes contained in a component and their relationship using a component diagram. For example, in the IMS, the P r o c e s s O r d e rcomponent depends on the S u p p l i e rand O r d e r classes because the component uses the methods of these classes for implementing the functions of processing an order received from a supplier. You can model the dependency relationship between the P r o c e s s O r d e rcomponent and S u p p l i e rand O r d e rclasses by using a component diagram. The following figure shows the dependency relationship between the P r o c e s s O r d e rcomponent and the S u p p l i e rand O r d e rclasses.

Techniques of Modeling Components


The three techniques of modeling the components of a software system are: Source code file modeling Executable file modeling Database modeling

Source Code File Modeling


The number of source code files of an application increases as you develop the software system or apply iterations to the software system. You can visualize the source code components of the software system in the following ways: Group the source code files into packages and depict them in a package diagram. Draw component diagrams to visualize the relationships among the source code files of the system.
www.niitstudent.com/india/Content/063OUML2S1/OEBPS/07_ch09.htm 11/37

7/21/12

KIT2 OOAD-UML-II

In the IMS, the various source code files are T e n d e r . c s ,S u p p l i e r . c s ,O r d e r . c s , and P a r t s . c s . The T e n d e r . c s file defines the functions of the T e n d e rclass. Similarly, the S u p p l i e r . c s and P a r t s . c s files define the functions of the S u p p l i e rand P a r t s classes, respectively. The T e n d e r . c s file is dependent on the S u p p l i e r . c s and P a r t s . c s files because the T e n d e r . c s file uses the S u p p l i e r and P a r t sclasses. Similarly, the O r d e r . c s file is dependent on the T e n d e r . c s ,S u p p l i e r . c s , and P a r t s . c s files because the O r d e r . c s file uses the T e n d e r ,S u p p l i e r , and P a r t sclasses. The following figure shows the component diagram containing the various source code files for the system and illustrating the dependency relationship among them.

Notice that the components in the component diagram are depicted using the file symbol instead of the usual component notation. You depict the components by using the file symbol when you want to emphasize that the component is a source code file. This is called stereotyping the constituents that you want to depict in the diagram.

Executable File Modeling


You can model the executable components of a software system by modeling the .exe, library, and database that constitute the system. If you need to model a distributed system, you should depict the executable components at different nodes. In addition, you need to depict the components that can form a part of other executable systems.
www.niitstudent.com/india/Content/063OUML2S1/OEBPS/07_ch09.htm 12/37

7/21/12

KIT2 OOAD-UML-II

The following figure depicts the various executable file components of IMS.

The preceding figure shows the P r o c e s s O r d e r . e x e ,G e n e r a t e O r d e r . e x e , and P r o c e s s B i l l . e x e executable components. All the executable components of the IMS use the inventory database, I n v e n t o r y . d b f .

Database Modeling
You can model the database components by using component diagrams. Each database component further contains database table components. You use special symbols in place of the usual component notation to represent a database and a database table component in a component diagram. You can also depict columns and stored procedures associated with each database table component. The significance of representing the various databases and database table components in the component diagram is that you can clearly visualize the large number of tables that the software system may include. The following figure shows the component diagram for modeling the inventory database of the IMS.

www.niitstudent.com/india/Content/063OUML2S1/OEBPS/07_ch09.htm

13/37

7/21/12

KIT2 OOAD-UML-II

The preceding figure depicts that the information related to t e n d e r ,o r d e r ,s u p p l i e r , and parts is stored in the database tables, P a r t s ,P a r t D e t a i l s ,O r d e r ,T e n d e r ,S u p p l i e r , and S u p p l i e r H i s t o r y .

Creating Deployment Diagramsiagrams


You draw deployment diagrams to visualize the hardware on which the software components need to be deployed. You can draw deployment diagrams immediately after identifying the classes, interfaces, and their relationships. Creating the deployment diagrams during the design process is a good practice because deployment related problems are easier to fix during the design phase than after the complete software system has been developed. The various computer systems or processing devices on which components are deployed are called nodes. You may have all the components on one node or on different nodes. For example, in desktop application, all the components execute on the same node. However, in a three-tier Web application, the various components are distributed on three distinct nodes: a node containing a Web server, a node containing a database server, and a node containing a client browser.

Note

A set of components that are executed on a particular node is called a distribution unit.

Notation of a Node
In UML, a node is represented as a 3-D rectangular box containing the components that execute within the
www.niitstudent.com/india/Content/063OUML2S1/OEBPS/07_ch09.htm 14/37

7/21/12

KIT2 OOAD-UML-II

node. A node may be located anywhere on a network. The following figure shows the notation of a node.

Distinction among nodes is achieved by assigning each node a name and classifying the various nodes into types depending on the type of components they execute. Nodes are associated with each other by a connection, which represents a communication channel. Communication channels depict how the various nodes are connected with each other. For example, it may specify whether the nodes are connected by using a Local Area Network (LAN), Wide Area Network (WAN), Internet or Ethernet. You depict a communication channel among nodes by a straight line drawn between the communicating nodes. For example, in the IMS, the components are i n v e n t o r y . e x e and i n v e n t o r y . d b f . The following figure shows a communication channel between the database server node executing the inventory database and the application server node executing the inventory application.

The dependency of a node on components is depicted using a dashed line. This indicates that a node uses the services of the components that are executing on another node. For example, you can depict the dependency relationship between an a p p l i c a t i o ns e r v e r node and a d a t a b a s es e r v e r component, as shown in the following figure.

www.niitstudent.com/india/Content/063OUML2S1/OEBPS/07_ch09.htm

15/37

7/21/12

KIT2 OOAD-UML-II

The following figure depicts the deployment diagram for the Inventory Management System.

www.niitstudent.com/india/Content/063OUML2S1/OEBPS/07_ch09.htm

16/37

7/21/12

KIT2 OOAD-UML-II

Note

You can also use deployment diagrams to depict a node instance that contains the run-time components of a software system.

Just a minute:

Which of the following diagrams is used to visualize the hardware on which the
17/37

www.niitstudent.com/india/Content/063OUML2S1/OEBPS/07_ch09.htm

7/21/12

KIT2 OOAD-UML-II

software components need to be deployed? 1. 2. 3. 4. Package diagram Component diagram Deployment diagram Interaction overview diagram

Answer:

3. Deployment diagram

Identifying Software Architecture ViewtypesArchitecture Viewtypes


A software architecture viewtype specifies the constituents that you may model in the architecture of a software system. UML lists the following predefined viewtypes: Module viewtype : Specifies the modules that implement a specific function. You also model the relationships among the modules of a software system. The relations that you may depict among the modules are, association, dependency, and generalization relationships. You can use package diagrams to depict the various modules grouped into logical packages. Component and Connector (C&C) viewtype : Specifies a collection of components where each of the components is an execution unit. You can also model the connectors, such as pipes and sockets, which define the interactions among the execution units. You can use component diagrams to depict the various components and the relationships among them. Allocation viewtype : Indicates a set of relationships among the components or modules of a software system with the development environment. In other words, the allocation viewtype depicts the resources allocated for the development of modules or components of the software system. You can use the package and component diagrams to depict the architecture of a software system from the allocation viewtype.

Activity: Architectural Modeling for the Bank ATM System

Problem Statement
Janes Technology needs to create the architectural model for the prototype of the InfoSuper bank ATM system. The prototype will include only the cash withdrawal feature of the InfoSuper bank ATM system. The project manager of Janes Technology has identified the following classes, attributes, and operations for the prototype of the InfoSuper bank ATM system.

www.niitstudent.com/india/Content/063OUML2S1/OEBPS/07_ch09.htm

18/37

7/21/12

KIT2 OOAD-UML-II

www.niitstudent.com/india/Content/063OUML2S1/OEBPS/07_ch09.htm

19/37

7/21/12

KIT2 OOAD-UML-II

www.niitstudent.com/india/Content/063OUML2S1/OEBPS/07_ch09.htm

20/37

7/21/12

KIT2 OOAD-UML-II

The project manager has also created the following class diagram after identifying the classes and operations for the prototype of the InfoSuper bank ATM system.

Identify the activities that the project manager needs to perform to create the architectural view for the prototype. Prerequisite : To perform this activity, you will need the BANK_ATM.vsd file, which you created in the activity Creating an Activity Diagram for the Infosuper Bank ATM of Chapter 8.

Solution
To create the architectural view for the prototype of the ATM system, you need to perform the following tasks: 1. Identify components and relationships among them. 2. Identify the nodes and their executable components.
www.niitstudent.com/india/Content/063OUML2S1/OEBPS/07_ch09.htm 21/37

7/21/12

KIT2 OOAD-UML-II

3. Create a component diagram. 4. Create a deployment diagram.

Task 1: Identifying Components and Relationships among Among themThem


The various components related to cash withdrawal feature of the ATM system are: ATMClient ATM Card Scanner Cash Dispenser Printer Bank Database The cash withdrawal feature of the ATM is implemented using the preceding components. The ATM component is the main application that executes on the regional server. The ATM uses the Bank Database to store, modify, delete, and fetch account information. The component ATMClient.exe executes on the ATM machine and is the application that provides the user interface for interaction with the customer. The ATMClient.exe communicates with the ATM for fetching the account data for a particular customer. The ATMClient.exe communicates with the card scanner to scan and verify the card details of the customer. The ATMClient.exe also communicates with the cash dispenser so that it provides specified cash to the customer. In addition, the ATMCLient.exe also communicates with the printer to print the transaction slip. The following figure shows the complete component diagram for the ATM system.

www.niitstudent.com/india/Content/063OUML2S1/OEBPS/07_ch09.htm

22/37

7/21/12

KIT2 OOAD-UML-II

Task 2: Identifying the Nodes and their Executable Components


The various deployment nodes for the execution of components are: Regional ATM Server: Contains the ATM. Database Server for Bank: Contains the centralized bank database system. InfoSuper Bank ATM : Contains ATMClient.exe, Card Scanner, Cash Dispenser, and Printer. The Regional ATM server hosts the main component, ATM, of the software system. The InforSuper bank ATM system hosts the components ATMClient.exe, CardScanner, CashDispenser, and Printer. The ATM system communicates with the Regional ATM server to fetch data from the bank database hosted by the database server for the bank. The InfoSuper Bank ATM node is connected to the Regional ATM Server node by using a WAN link. Finally, the Regional ATM Server node is connected to the Database Server for Bank node by using a WAN link. The following figure shows the complete deployment diagram for the ATM system. Deployment Diagram for the ATM System

Task 3: Creating a Component Diagram


www.niitstudent.com/india/Content/063OUML2S1/OEBPS/07_ch09.htm 23/37

7/21/12

KIT2 OOAD-UML-II

To create a component diagram, you need to perform the following steps: 1. Select StartAll Programs Microsoft Office Microsoft Office Visio for Enterprise Architects . 2. Open the Bank_ATM Visio file. The Bank_ATM model appears in Visio. 3. Right-click Top Package in the Model Explorer window, and select NewPackage . The UML Package Properties dialog box appears. 4. Type Component in the Name text box, as shown in the following figure.

UML Package Properties Dialog Box


5. Click the OK button in the UML Package Properties dialog box. The Component folder appears in the tree structure of the Model Explorer window. 6. Right-click the Component folder in the Model Explorer window, and select NewComponent Diagram. The Component-1 tab with a blank drawing page appears. 7. Drag the Component symbol ( ) from the UML Component (Metric) stencil on the drawing page, as shown in the following figure.

www.niitstudent.com/india/Content/063OUML2S1/OEBPS/07_ch09.htm

24/37

7/21/12

KIT2 OOAD-UML-II

8. Double-click Component1 to rename it. The UML Component Properties dialog box appears. 9. Type Bank Database in the Name text box, as shown in the following figure.

UML Component Properties Dialog Box


10. Click the OK button. The Bank Database component appears on the Visio drawing page, as shown in the following figure.

11. Similarly, draw the following components for the cash withdrawal feature of the ATM system: ATM Card Scanner ATMClient CashDispenser Printer After drawing all the components the component diagram should appear as shown in the following figure.
www.niitstudent.com/india/Content/063OUML2S1/OEBPS/07_ch09.htm 25/37

7/21/12

KIT2 OOAD-UML-II

12. Drag the Dependency symbol ( ) from the UML Component (Metric) stencil on the drawing page to create a dependency relationship between Bank Database and ATM components, as shown in the following figure.

www.niitstudent.com/india/Content/063OUML2S1/OEBPS/07_ch09.htm

26/37

7/21/12

KIT2 OOAD-UML-II

13. Similarly, draw dependency relationships between all the components, as shown in the following figure.

www.niitstudent.com/india/Content/063OUML2S1/OEBPS/07_ch09.htm

27/37

7/21/12

KIT2 OOAD-UML-II

Task 4: Creating a Deployment Diagram


To create a deployment diagram, you need to perform the following steps: 1. Right-click the Top Package in the Model Explorer window and select NewPackage . The UML Package Properties dialog box appears. 2. Type Deployment in the Name text box, as shown in the following figure.

www.niitstudent.com/india/Content/063OUML2S1/OEBPS/07_ch09.htm

28/37

7/21/12

KIT2 OOAD-UML-II

UML Package Properties Dialog Box


3. Click the OK button. The Deployment folder is added and appears in the tree structure of the Model Explorer window. 4. Right-click the Deployment folder in the Model Explorer window, and select NewDeployment Diagram. The Deployment-1 tab with the blank drawing page appears. 5. Drag the Node symbol ( ) from the UML Deployment (Metric) stencil on the drawing page, as shown in the following figure.

Node Symbol
6. Double-click Node1 to rename it. The UML Node Properties dialog box appears. 7. Type Regional ATM Server in the Name text box, as shown in the following figure.

www.niitstudent.com/india/Content/063OUML2S1/OEBPS/07_ch09.htm

29/37

7/21/12

KIT2 OOAD-UML-II

UML Node Properties Dialog Box


8. Click the OK button. The Regional ATM Server Node appears in the drawing page, as shown in the following figure.

9. Drag the Component symbol from the UML Deployment (Metric) on the drawing page and place it on the Regional ATM Server node, as shown in the following figure.

www.niitstudent.com/india/Content/063OUML2S1/OEBPS/07_ch09.htm

30/37

7/21/12

KIT2 OOAD-UML-II

10. Double-click the component and rename it as ATM , as shown in the following figure.

11. Similarly, draw the nodes for Database Server for Bank and InfoSuper Bank ATM , as shown in the following figure.

www.niitstudent.com/india/Content/063OUML2S1/OEBPS/07_ch09.htm

31/37

7/21/12

KIT2 OOAD-UML-II

12. Drag the Dependency symbol ( ) from the UML Deployment (Metric) on the drawing page to draw the dependency relationship between all the components as shown in the following figure.

www.niitstudent.com/india/Content/063OUML2S1/OEBPS/07_ch09.htm

32/37

7/21/12

KIT2 OOAD-UML-II

13. Drag the Communication symbol (

) from the UML Deployment (Metric) on the

14. 15. 16. 17. 18.

drawing page to draw the communication relationship between the Regional ATM Server and Infosuper Bank ATM node. Double-click the communication symbol connecting the Regional ATM Server node and the InfoSuper Bank ATM nodes to open the UML Association Properties dialog box. Type WAN in the Name text box and click the OK button. Right-click the communication symbol connecting the Regional ATM Server node and the InfoSuper Bank ATM nodes and select the Shape Display Options option. The Shape Display Options dialog box appears. Select the Name check box in the General options section and clear the First end name , Second end name , and End multiplicities check boxes in the End options section. Click the OK button. The deployment diagram appears as shown in the following figure.

www.niitstudent.com/india/Content/063OUML2S1/OEBPS/07_ch09.htm

33/37

7/21/12

KIT2 OOAD-UML-II

19. Similary, draw the communication link between the Regional ATM Server and the Database Server for Bank nodes. The final deployment diagram should appear as shown in the following figure.

www.niitstudent.com/india/Content/063OUML2S1/OEBPS/07_ch09.htm

34/37

7/21/12

KIT2 OOAD-UML-II

20. Save and close the BANK_ATM model. 21. Close Microsoft Visio.

Summary
In this chapter, you learned that: Architectural modeling is used to depict the physical constituents of a software system. The physical constituents consist of the components and nodes on which the components execute. The components of a software system can be modeled on the basis of different architectural viewtypes. The various viewtypes are the module viewtype, component and connector viewtype, and allocation viewtype. The artifacts that UML provides to enable architectural modeling are: package diagrams, component diagrams, and deployment diagrams. Packages are used to group the related constituents of a software system. Component diagrams are used to model the various components required for a system to execute. Deployment diagrams are used to depict the various nodes on which the components of a software system execute.

Exercises
www.niitstudent.com/india/Content/063OUML2S1/OEBPS/07_ch09.htm 35/37

7/21/12

KIT2 OOAD-UML-II

Exercise 1
Blue Valley Consulting Inc. has decided to implement the data entry system, which includes providing functionality to enter the information of the disposed property, for Real Estate Management System. The details of the module, which is required to implement the data entry system, are:

Module: PROPERTY DISPOSAL


This module will enable the Operations Manager to record the information of the property, which will be disposed off. The module will allow the Operations Manager to enter a termination date when the property will be disposed off along with any additional information about the disposal process, if any. The system will not accept any changes after the termination date for the property that will be disposed off. Identify the components, nodes, and packages for the Real Estate Management System, which contain all the modules. In addition, create the package diagrams, component diagrams, and deployment diagram for the same. Hint: To complete this exercise, you need to use the Visio file that you created for Exercise 1 of Chapter 8.

www.niitstudent.com/india/Content/063OUML2S1/OEBPS/07_ch09.htm

36/37

7/21/12

KIT2 OOAD-UML-II

Reference Links

Introducing Architectural M odeling


Reference Reading: Books Software Architecture in Practice by Len Bass Paul Clements Rick Kazman Publisher: Addison Wesley Reference Reading: URLs

http://smartdraw.com/resources/centers/uml/uml6.htm#whatcomponent

www.niitstudent.com/india/Content/063OUML2S1/OEBPS/07_ch09.htm

37/37

Das könnte Ihnen auch gefallen