课程学习_Unit1_1


Chapter 1 Views and Quality Objectives of Software Construction

1.1 Multi-dimensional software views

Multi-dimensional

1.By phases: build-time views

  • idea?requirement?design?code?installable/executable package

(1)Build-time,moment,and code-level view

functions classes methods interfaces etc


  • Lexical-based semi-structured source code
  • Syntax-oriented program structure: Abstract Syntax Tree (AST)

image-20220427010148024

  • Semantics-oriented program structure: use UML

image-20220427010254183

(2)Build-time, period, and code-level view

changes /Code churn

image-20220427010722497


  • Code churn: line added/modified/deleted from a file from one version to another

    Like the Push

(3)Build time, moment, and component-level view

files/directories/packages/libraries


  • Library

    • stored in disk files , can be reused
    • an extension
    • a library function can be viewed as an extension to the standard language
    • From OS/SDK/third-party sources/self
  • 开发者总是在自己的程序中加入已经编好的库

  • Linking with a library

    • 需要告诉IDE和JVM在哪里寻找这些库
    • Static Linking
      • 库被拷贝进入代码整体,执行的时候无需提供库文件
      • 发生在构造过程
    • Dynamic Linking
      • 在build阶段只做标记
      • 运行时按标记装载库至内存
      • 必须把所有动态库都复制给用户
      • 更新版本时不一定需要更新原始文件

(4)Build-time, period, and component-level view

  • Version Control System

    2.Runtime Views

    Code-level /Component-level /Moment view /Period view


  • Executable Programs
    • Native Machine Code
    • Full Program Interpretation
    • Interpreted Byte Codes
    • Java Virtual Machine

(5)Run-time, moment, and code-level view

  • Snapshot diagram
  • Fine-grained states of a program
  • Memory dump

(6)Run-time, period and code-level view

  • Sequence diagram
  • Execution tracing

(7)Run-time, component and component-level view

  • Deployment diagram

(8)Run-time, period and component-level view

image-20220427235038630

image-20220427235102198