Object-Oriented Design Lecture 18 Department of Computer Engineering Implementation Workflow 1
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. 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. 3
Implementation Model 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 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. 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. 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. 8
Deployment Diagram: Descriptor Form Example Nodes 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. 10
Deployment Diagram: Instance Form Example Nodes 11
Deployment Diagrams: Stereotyping through Icons 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. 13
Artifacts: Example 14
Artifacts: Internal Structure Example 15
Artifacts: Standard Stereotypes 16
Artifacts: Profile Stereotypes Example 17
Deployment Diagram: Complete Example 18
Reference Arlow, J., Neustadt, I., UML 2 and the Unified Process: Practical Object-Oriented Analysis and Design, 2 nd Ed. Addison-Wesley, 2005. 19