Object-Oriented Design
Lecture 18
Implementation Workflow Sharif University of Technology 1 Department of Computer Engineering Implementation Workflow
• Implementation is primarily about creating code. However, the OO analyst/designer may be called on to create an implementation model.
• The implementation workflow is the main focus of the Construction phase.
• Implementation is about transforming a design model into executable code.
Sharif University of Technology 2 Implementation Modeling
• Implementation modeling is important when: • you intend to forward-engineer from the model (generate code); • you are doing CBD in order to get reuse.
• The implementation model is part of the design model.
• Artifacts - represent the specifications of real-world things such as source files: • components are manifest by artifacts; • artifacts are deployed onto nodes.
• Nodes - represent the specifications of hardware or execution environments.
Sharif University of Technology 3 Implementation Model
Sharif University of Technology 4 Implementation Workflow: Activities
• The Implementation Workflow consists of the following activities:
• Architectural Implementation • Integrate System • Implement a Component • Implement a Class • Perform Unit Test
Sharif University of Technology 5 Architectural Implementation
• The UP activity Architectural Implementation is about identifying architecturally significant components and mapping them to physical hardware.
• The deployment diagram maps the software architecture to the hardware architecture.
• Deployment diagrams allow you to model the distribution of your software system over physical hardware. • In the design workflow you can create a "first cut" deployment diagram by identifying nodes or node instances, and relationships; • You refine this as part of the implementation workflow by adding components or component instances.
Sharif University of Technology 6 Deployment Diagram: Descriptor Form
• The descriptor form deployment diagram may be used to model what types of hardware, software, and connections there will be in the final deployed system. • It describes a whole set of possible deployments. • It shows: • nodes - what types of software environments and hardware run the system; • relationships - the types of connections between the nodes; • components - the types of components deployed on particular nodes.
Sharif University of Technology 7 Deployment Diagram: Nodes
• Node - represents a type of computational resource. • «device» - a type of physical device such as a PC or a Sun Fire server. • «execution environment» - a type of execution environment for software, such as an Apache web server.
• Node instance - represents a specific computational resource.
Sharif University of Technology 8 Deployment Diagram: Descriptor Form – Example Nodes
Sharif University of Technology 9 Deployment Diagram: Instance Form
• The instance form deployment diagram shows a particular deployment of the system over specific, identifiable pieces of hardware. • It describes one specific deployment of the system, perhaps at a specific user site. • It shows: • node instances - specific pieces of software environments and hardware; • relationship instances - specific relationships between node instances; • component instances - specific, identifiable pieces of software deployed on a node instance; for example, a particular copy of Microsoft Office with a unique serial number.
Sharif University of Technology 10 Deployment Diagram: Instance Form – Example Nodes
Sharif University of Technology 11 Deployment Diagrams: Stereotyping through Icons
Sharif University of Technology 12 Deployment Diagram: Artifacts
• Artifact - represents the specification of a real-world thing such as a particular executable file, source file, document or database table.
• Artifacts can manifest one or more components.
• Artifact instance - represents a specific instance of a particular artifact, such as a specific copy of a particular executable file deployed on a particular machine.
Sharif University of Technology 13 Artifacts: Example
Sharif University of Technology 14 Artifacts: Internal Structure – Example
Sharif University of Technology 15 Artifacts: Standard Stereotypes
Sharif University of Technology 16 Artifacts: Profile Stereotypes – Example
Sharif University of Technology 17 Deployment Diagram: Complete Example
Sharif University of Technology 18 Reference
• Arlow, J., Neustadt, I., UML 2 and the Unified Process: Practical Object-Oriented Analysis and Design, 2nd Ed. Addison-Wesley, 2005.
Sharif University of Technology 19