Programming language

PDL, for short, is the language used for coding

classification

Low-level languages

Including machine language and assembly language

Features:

  • Depending on the corresponding machine structure, the statements correspond to the operation of the computer hardware, and the instructions vary from machine to machine
  • Low production efficiency, error prone, difficult maintenance
  • Fast response

A high-level language

  • From the perspective of application, it can be divided into three types: basic language, modern language and special language
  • The language can be divided into four types: system implementation language, static high level language, block structure high level language and dynamic high level language
  • From the perspective of application scope, it can be divided into general language and special language
  • From the perspective of user requirements, it can be divided into procedural language and non-procedural language

Choice of language

Analyze it from the following angles:

  • Scope of application of the project
  • Complexity of algorithms
  • The environment in which the software runs
  • Software performance considerations and implementation conditions
  • Complexity of data structures
  • Knowledge level and psychological factors of software developers

Redundant programming and fault tolerance techniques

  • Redundancy: Refers to all the resources, including hardware, software, information, and time, that are unnecessary to implement the specified functions of the system. It is an important technical means to improve system reliability
  • Fault tolerance: in the case of one or more faults or errors, the computer system can detect the existence of faults and take measures to tolerate the faults

Object-oriented analysis and design

Object-oriented (OO) method is to simulate the way of thinking used by human beings. The way of thinking to solve problems is to start with objective objects in the real world, and try to use the natural way of thinking of human beings to construct software system from many aspects. It is characterized by inheritance, encapsulation and polymorphism

Unified Modeling Language

Unified Modeling Language (UML) is a well defined, easy to express, powerful and universally applicable Modeling Language.

composition

The definition of UML includes UML semantics and UML representation

The characteristics of

  • Unified standards
  • Object-oriented modeling
  • Visual modeling
  • Strong presentation ability
  • Easy to learn and easy to use

Common elements

Model elements are the basic units of UML model construction. General model elements are divided into the following two categories:

  • Base elements: UML defined model elements, such as classes, nodes, artifacts, annotations, and so on
  • Stereotype elements: New model elements constructed on base elements, called stereotype elements, are formed by adding a new definition to the base element. Stereotype elements are represented by stereotype types enclosed in double Angle brackets <<>>

The links between models are also model elements, including dependencies, associations, generalizations and implementations

  • Dependency: Indicates that an element is dependent on another element
  • Generalization: Expresses the relation between general and special, i.e. “general” elements are generalizations of “special” elements
  • Implementation: Is the relationship between a specification and its implementation. Specifications describe the structure and behavior of something, but do not determine the details of how those behaviors are implemented
  • In addition to the above model elements, model elements include messages, actions, and so on

view

An abstraction of an Angle of the system that consists of one or more diagrams, defined primarily by five categories of views

Use case view

Describe the external characteristics and functions of the system from the user’s point of view

  • Role: Describe the functional requirements of the system, identify use cases and practitioners
  • Target audience: customers, analysts, designers, developers, and testers
  • Descriptive use diagrams: use case diagrams and activity diagrams
  • Status: Its content directly drives the development of other views

Logical view

How to realize the function of the system from the perspective of static structure and dynamic behavior

  • Purpose: Describes the implementation of system functionality proposed in the use case view
  • For: designers, developers, and analysts
  • Description diagrams: The static structure of the system is described in class diagrams and object diagrams, while the dynamic model is described in state diagrams, sequence diagrams, collaboration diagrams, and activity diagrams
  • Status: Describes the static structure of the system and the dynamic collaboration that occurs as a result of sending messages

Concurrent view

It mainly considers efficient utilization of resources, parallel execution of code and processing of asynchronous events in the system environment

  • Function: display the concurrency of the system, and solve the communication and synchronization problems in the concurrent system
  • Target audience: developers and system integrators
  • The description consists of diagrams: state diagram, collaboration diagram and activity diagram
  • Status: Divides the system into concurrent threads of control that handle information and synchronization for these processes

The component view

Components are different types of code modules that are units of software that build applications

  • Role: Describes the system building organization and implementation modules and their dependencies
  • For: Developers
  • Description diagram: component diagram
  • Status: Describe how the system is divided into software builds and how it is programmed

The configuration view

Displays the specific deployment of the system. Deployment refers to the configuration of the system to a physical structure consisting of computers and devices

  • Function: Displays the physical deployment of the system
  • Target audience: developers, system successors, and testers
  • Description diagram: Configuration diagram
  • Status: Describes the connection of hardware devices and which programs or objects execute on which computer

figure

Used to describe the contents of a view and are the components that make up a view. UML defines 10 different diagrams, which fall into five categories

Use case diagram

Use Case Diagram describes the functions of the system from the user’s perspective

Graph:

  • Use Case diagram: Lists use cases and actors in the system, with primary actors on the left and secondary actors on the right
The name of the Icon symbols Functional description
participants A term used to describe external entities related to system functionality, which can be users or external systems
Use cases It is used to represent an external functional requirement of the developed system and analyze the obtained requirement from the user’s perspective
system It is used to define the scope of system functionality, with use cases describing system functionality placed within it and actors describing external entities placed outside it
associated Connects an actor to a use case, indicating that the external entity of the system that the actor represents is related to the system requirements described by the use case
use Represents a usage relationship between two use cases
expand Connecting use case A to use case B means that use case B describes A basic requirement, while use case A describes A special case of this basic requirement, which is an extension

Static figure

Static Diagram, which describes the Static structure of a system

Graph:

  • Class diagram: Describes a static structure that remains valid throughout the life cycle of a system

  • Object graph: is an instance of a class. An object graph is an instance of a class graph. Because an object has a life cycle, an object graph can only exist in a certain period of time in the system

  • Package diagram: Used to describe the hierarchical structure of the system. It consists of packages or classes and shows the relationship between packages

The behavior

Behavior Diagram, which describes the dynamic model of the system and the interaction between objects

Graph:

  • State diagram: Describes all possible states of the objects of the class and the transition conditions of the state when an event occurs

  • Activity diagram: Describes the activities performed to satisfy the requirements of the use case and the constraints between the activities, which facilitates the identification of parallel activities

Interaction diagrams

Interactive Diagram describes the interaction between objects

Graph:

  • Sequence diagram: Shows dynamic cooperation between objects, emphasizing the order in which messages are sent between objects, and shows interaction between objects, emphasizing time and order

  • Cooperation diagram: Shows the dynamic cooperation between objects, emphasizing the relationship between supervisors and subordinates. It is composed of object, link and message. The numbers on the messages represent the order

Realize the figure

Implementation Diagram describes the physical Implementation and configuration of the system

Graph:

  • Component diagrams: Describe the physical structure of code components and the dependencies between components, which help analyze and understand the degree of interaction between components

  • Configuration diagram: Defines the physical architecture of the hardware and software in the system. It can show the actual computers and devices and the connections between them, as well as the types of connections and dependencies between components. It consists of three elements: processor, device and connection.

application

  • Requirements phase: Capture user requirements through use case diagrams
  • Analysis stage: identify the relationship between classes through static diagrams, and describe the dynamic behavior of the system through behavior diagrams and interaction diagrams
  • Design stage: expand the results of analysis stage into technical solutions, add new classes to improve technical details
  • Construction phase: The design phase of the class, into object-oriented programming language code
  • Test phase: static diagram specification for unit tests; Interaction diagrams and implementation diagrams for integration testing; System test, acceptance test use case diagrams to verify behavior