2023 System Analyst --- Requirements Engineering

1. Requirements engineering

1. Overview of Requirements Engineering:

  1. Requirements Development Activities: Requirements Acquisition, Requirements Analysis, Requirements Definition, Requirements Verification
  2. Requirements management activities: change control, version control, requirements tracking, requirements status tracking

2. Demand classification:

  1. Hierarchy of needs:
    1. Business requirements: It refers to the high-level target requirements of enterprises or customers for the system, usually from project investors, customers who purchase products, management personnel of customer units, marketing departments or product planning departments, etc. The project view and scope can be determined through business requirements, laying the foundation for future development work.
    2. User requirements: describe the specific goals of the user, or the tasks that the user requires the system to be able to complete. That is, user requirements describe what users can do with the system
    3. System requirements: It is to describe the requirements of the software from the perspective of the system, including functional requirements, non-functional requirements and design constraints. Functional requirements are also called behavioral requirements, which specify the software functions that developers must implement in the system, and users use these functions to complete tasks and meet business requirements. Non-functional requirements refer to the attributes or qualities that the system must have, and can be subdivided into software quality attributes and other non-functional requirements. Design constraints, also known as constraints or supplementary specifications, are usually some constraints on the system.
  1. QFD
    1. Quality Function Deployment QFD is a technology that converts user requirements into software requirements. Its purpose is to maximize user satisfaction in the software engineering process. QFD divides software requirements into three categories:
      1. General requirements (basic requirements): The functions or performance that users think the system should achieve, the more users are realized, the more satisfied they will be.
      2. Expected requirements: Users take it for granted that the system should have functions or performances, but they cannot correctly describe the requirements for these functions or performances they want. If expectations are not met, users will be dissatisfied
      3. Exciting needs (unexpected needs): It is a function or performance outside the scope of user requirements. The realization of these needs will make the user happier, but the failure to realize them will not affect their purchase decisions
  1. PLECES framework:
    1. Performance (Preformance): Performance is used to describe the current operating efficiency of the enterprise, and can analyze the processing speed of the current business; for example: response time, throughput
    2. Information: Information and data indicators are used to describe various problems in the input, output and processing of business data; for example: data cannot be captured, data is inaccurate
    3. Economics: Economic indicators mainly analyze the current problems of the enterprise from the perspective of cost and benefit; for example: the number of orders decreases
    4. Control: Improve the security and control level of information systems; for example: identity authentication
    5. Efficiency: Improve the efficiency of the use of people, money, and materials in an enterprise; for example: waste of time, materials, and resources
    6. Service: Improve the service quality of enterprises to customers, suppliers, partners, customers, etc. service providers; for example: system results are inaccurate, difficult to use, incompatible with other systems, etc.

3. Requirements Development --- Requirements Acquisition Method

  1. Collecting data: connecting with the system

2. Object-Oriented Requirements Analysis

First, the concept of object-oriented:

    1. Object: attribute (data) + method (operation) + object Id

Class (Entity, Control, Boundary)

  1. The entity class maps each entity in the requirements, and the entity class saves the information that needs to be stored in the permanent storage. For example, the online education platform system can extract the student class and the course class, both of which belong to the entity class.
  2. The control class is the class used to control the work of the use case. It is generally converted from a verb-object structure phrase (verb + noun or noun + verb) to a noun. For example: use case: "authentication" can correspond to a control class "authenticator , which provides all operations related to authentication.
  3. Boundary classes are used to encapsulate the flow of information or data flowing inside and outside a use case. The boundary class is located at the interface between the system and the outside world, including all windows, reports, printers, scanners and other hardware interfaces, as well as interfaces with other systems
  4. Inheritance and Generalization: Mechanisms for Reuse
  5. Encapsulation: hide the properties and implementation details of the object, and only expose the interface to the outside world
  6. Polymorphism: Different objects receive the same message and produce different results
  7. Interface: A special class that has only method definitions but no implementation
  8. Overloading: A class can have multiple methods with the same name but different parameter types
  9. Messages and message communication: messages are communicated asynchronously

Two, UML diagram concept

  1. Structural affairs: the most static part: including: classes, interfaces, collaborations, use cases, activity classes, components, and nodes
  2. Behavioral transactions: represent actions in time and space, including: messages, action sequences, connections
  3. Grouping transactions: regarded as joint ventures, such as: packages, components
  4. Annotation Transactions: Interpretation parts of UML models. Describe, illustrate, and label elements of a model

Three, UML diagram classification:

  1. Class Diagram: A class diagram describes a set of classes, interfaces, collaborations and the relationships between them
  2. Object Diagram: An object diagram describes a set of objects and the relationships between them. Object diagrams describe instances and static snapshots of things created in class diagrams.
  3. Component Diagram: A component diagram describes an encapsulated class and its interfaces, ports, and internal structure composed of embedded components and connectors. Component diagrams are used to represent the static design implementation view of the system. Component diagrams are important for building large systems from small components. A component diagram is a variant of a class diagram (an encapsulated class and its interface)
  4. Deployment diagram: The deployment diagram describes the configuration of the runtime processing nodes and the components that live in them. A deployment diagram gives a static deployment view of the architecture. Usually a node contains one or more deployment diagrams (mapping between software and hardware)
  5. Artifact diagram: physical structure of the system
  6. Package diagram: the organizational unit decomposed by the model itself, and the dependencies between them
  7. Combination structure diagram
  8. Use Case Diagram: The interaction of the system with external actors.
  9. Sequence diagram (sequence diagram): A sequence diagram is a type of interaction diagram (Interaction diagram), which emphasizes the order in which messages are sent between objects while showing the interaction between objects.
  10. Communication diagram (communication diagram) collaboration diagram, communication diagram is an interaction diagram, which emphasizes the structural organization of objects or participants who send and receive messages.
  11. Timing Diagrams: Emphasize Real Time
  12. Interaction overview diagram
  13. state diagram. A state diagram describes a state machine, which consists of states, transitions, events, and activities. The state diagram gives a dynamic entity diagram of an object. It is especially important for modeling the behavior of interfaces, classes, or collaborations, and it emphasizes the behavior of objects caused by events, which is very helpful for modeling reactive systems. State transition transitions.
  14. Activity diagram: An activity diagram shows a process or other computing structure as a step-by-step flow of control and data within the computation. Activity diagrams focus on the dynamic view of the system. It is particularly important to the functional modeling and business process modeling of the system, and emphasizes the control process between objects. Like a program flowchart, an activity diagram can support concurrent behavior of activities.

Four, UML diagram relationship:

  1. Use case relationships include: containment relationship, extension relationship, generalization relationship
    1. Inclusion relationship: The extracted public use case is called abstract use case, and the original use case is called basic use case or basic use case; when public behavior can be extracted from two or more use cases, the inclusion relationship should be used to represent them.
    2. Extended relationship: If a use case obviously mixes two or more different scenarios, that is, multiple branches may occur according to the situation, this use case can be divided into a basic use case and one or more extended use cases, so that the description Could be more clear.
    3. Generalization relationship: When multiple use cases share a similar structure and behavior, their commonality can be abstracted as a parent use case, and other use cases can be used as sub-use cases in the generalization relationship. In the generalization relationship of use cases, sub-use cases are a special form of parent use cases, and sub-use cases inherit all the structures, behaviors and relationships of parent use cases.
  1. Class diagram, object diagram relationship.
    1. Dependency: A change in one thing affects another.
    2. generalization relationship, special, general relationship
    3. Association relationship: describes a set of chains, which are connections between objects
    4. Aggregation relationship, whole and part lifecycles are different
    5. Composite relationship: the whole has the same life cycle as the part
    6. Implementation relationship: the relationship between interfaces and classes

3. System design

1. Structural design

1. Principles of functional module design

Moderate module size: 50---10 lines, no more than 500 lines

Appropriate system depth and width ratio to minimize the depth of scheduling

Fan-in and fan-out of the humidity control module: fan-out 3--4, generally no more than 7, the larger the fan-in, the better

Single entry, single exit

The scope of the module should be within the module

Function should be predictable

High cohesion and low coupling

The system breaks down into layers

less data redundancy

2. Measurement of module independence

  1. Aggregation: Measures the tightness of the combination of elements inside the module

Accidental aggregation: There is no relationship between the actions performed by the modules, or only a very loose relationship

Logical aggregation: each component within the module has similar processing actions logically, but has nothing to do with each other in terms of functional usage

Time aggregation: the processing actions contained in each component inside the module must be executed at the same time

Process aggregation: Although the actions to be completed by each component inside the module are irrelevant, they must be executed in a specific order

Communication aggregation: the actions completed by each component of the module use the same data or generate the same output data

Sequential aggregation: For each part inside the module, the final output of the action processed by the previous part is the input of the action processed by the latter part

Functional aggregation: the internal parts of the module all belong to a whole, and perform the same function, and each part is necessary to realize the function.

  1. Coupling: measures the degree of interdependence between different modules
    1. Indirect coupling: There is no direct relationship between the two modules, and their connection is completely realized through the control and calling of the main module
    2. Data coupling: Two modules exchange information with each other through data parameters
    3. Marker coupling: A group of modules pass record information through the parameter table. This record is a substructure of a certain data structure, rather than a simple variable
    4. Control coupling: control information is included in the information passed between two modules
    5. External coupling: A group of modules all access the same global simple variable instead of the same global data structure, and the information of the global variable is not passed through the parameter table.
    6. Public coupling: information is passed between two modules through a common data area
    7. Content coupling: one module needs to refer to the internal information of another module
  1. The four elements of the module:
    1. Input and output: The input source and output destination of the module are the same caller, that is, a module obtains input from the caller, processes it and then returns the output to the caller.
    2. Processing function: Refers to the work done by the module to convert input into output
    3. Internal data: Refers to data that is only referenced by the module itself
    4. Program code: refers to the program used to realize the module function

3. System structure diagram

System structure chart (Structure Chart, SC), also known as module structure chart, is a tool in the software outline design stage, reflecting the function realization and the connection and communication between modules, including the hierarchical structure between modules, that is, reflecting The overall structure of the system. In the system analysis stage, the system analyst can use the SA method to obtain the logical model of the system composed of DFD, data dictionary and processing instructions; in the system design stage, the system designer can derive the system initialization SC from the DFD according to some rules . Commonly used SCs mainly include transformation type, transaction type and mixed type.

SC includes four parts: modules, calling relationship between modules, communication between modules and auxiliary control symbols.

2. Object-oriented design

  1. Design Principles:
    1. System Design --- Object-Oriented Design --- Design Principles
    2. Single Responsibility Principle: Design a class with a single purpose
    3. Development-closed principle: open to extension, closed to modification
    4. Li-style substitution principle: Subclasses can replace parent classes
    5. Dependency Inversion Principle: Depend on abstractions, not concrete implementations; program to interfaces, not implementations
    6. Interface Segregation Principle: Using multiple dedicated interfaces is better than using a single general interface
    7. Composition reuse principle: Try to use composition instead of inheritance relationship to achieve reuse
    8. Demeter Principle (Least Known Principle): An object should know as little as possible about other objects
  1. Design Patterns:
    1. Concept: High-level decisions in software design, such as C/S structure, belong to architectural patterns, and architectural patterns reflect the basic design decisions made in the process of developing software systems
    2. Design patterns: mainly focus on software system design, regardless of the specific implementation language
    3. Idiomatic usage: It is the lowest-level mode, focusing on the design and implementation of software systems, and describing the relationship between components through a specific programming language during implementation. Each programming language has its own specific mode, that is, the idiom of the language. For example, reference counting is an idiom in the C++ language.
  1. Classification of Design Patterns:
    1. Creational: Related to the creation of objects, abstracting the instantiation process, they help a system establish and how to create, compose, and represent its objects. A class creational pattern uses inheritance to change the class being instantiated, while an object creational pattern delegates instantiation to another object.
      1. factory method pattern
      2. Abstract Factory Method Pattern
      3. prototype pattern
      4. singleton pattern
      5. builder pattern
    1. Structural patterns deal with the composition of classes or objects, Structural design patterns deal with how to combine classes and objects to obtain a larger structure, and Structural patterns use the inheritance mechanism to combine interfaces or implementations. Structural object mode is not a combination of interface and implementation, but describes how to combine some objects to achieve some methods of new functions
      1. adapter pattern
      2. bridge mode
      3. combination mode
      4. decorator pattern
      5. appearance mode
      6. Flyweight mode
      7. Proxy mode
    1. Behavioral patterns involve the allocation of responsibilities between algorithms and objects. Behavioral patterns not only describe the patterns of objects or classes, but also describe the communication patterns between them. Behavioral patterns use inheritance mechanisms to assign behaviors between classes, including module class patterns and Interpreter mode. The Behavioral Object pattern uses object composition instead of inheritance. Some behavioral object patterns model how a group of peer objects cooperate to accomplish tasks that none of them can do alone;
      1. Chain of Responsibility Pattern
      2. command mode
      3. interpreter mode
      4. iterator pattern
      5. mediator pattern
      6. memo mode
      7. Observer pattern
      8. state mode
      9. strategy pattern
      10. template method pattern
      11. visitor pattern

4. WEB development

1. Dimension

    1. From an architectural point of view: MVC, MVP, MVVM, REST, WebService, microservices
    2. From concurrent distribution: cluster (load balancing), CDN
    3. From the cache: MemCache, Redis, Squid
    4. Slave data: master-slave database (master-slave replication), memory database, denormalization technology, NoSql, partition and table technology, view and materialized view
    5. From the perspective of persistence: Hibernate, MyBatis
    6. Distributed storage: Hadoop, FastDFS, blockchain
    7. Data encoding: XML, JSON
    8. Web application server: Apache, WebSphere, Tomcat, Jboss, IIS
    9. Security: Sql injection
    10. Others: static, stateful and stateless, responsive web design, middle platform

2. Load balancing

    1. Application layer load balancing,
      1. HTTP redirection, HTTP redirection is the request forwarding of the application layer. The user's request has actually reached the HTTP redirection load balancing server, and the server is redirected according to the algorithm requirements. After receiving the redirection request, the user requests the real cluster again. Features: Simple deployment, but poor performance
      2. Reverse proxy server, when the user's request arrives at the reverse proxy server (has arrived at the computer room of the website), the reverse proxy server forwards it to the specific server according to the algorithm. Commonly used apache and nginx can act as reverse proxy servers; features: simple deployment, but the proxy server may become a performance bottleneck.
    1. Transport layer load balancing;
      1. DNS domain name resolution load balancing, DNS domain name resolution load balancing is to obtain the IP address corresponding to the domain name when the user requests the DNS server, and the DNS server directly gives the server IP after load balancing;
      2. Features: The efficiency is higher than HTTP redirection, reducing the cost of maintaining load balancing servers. However, if an application server fails, DNS cannot be notified in time, and the control of DNS load balancing lies with the domain name service provider, and the website cannot make more improvements and become more powerful. management
      3. NAT-based load balancing, NAT-based load balancing maps an external IP address to multiple IP addresses, and dynamically converts each connection request to an internal node address.
      4. Features: The technology is relatively mature, generally at the gateway position, and can be realized through hardware. This technology is generally used like a four-layer switch.
    1. Hardware load balancing: F5
    2. Software load balancing: LVS, Nginx, HAproxy
    3. static algorithm
      1. Round-robin algorithm: call server requests to different nodes (servers) in turn
      2. Weighted Round Robin Algorithm: Considering the Differences in Processing Capabilities of Different Nodes
      3. Source address hashing algorithm: According to the source IP address of the request, use it as a hash key to find the corresponding node from the statically allocated hash table
      4. Target address hashing algorithm: find the corresponding node by hashing according to the requested target IP
      5. Random algorithm: random allocation, simple, but uncontrollable
    1. Dynamic Algorithm (Dynamic Load)
      1. Minimum number of connections algorithm: When each node has the same processing capacity, new requests are allocated to the node with the least number of current active requests
      2. Weighted minimum connection number algorithm: Considering the different processing capabilities of nodes, allocate according to the minimum number of connections
      3. Weighted percentage algorithm: Considering the utilization rate of nodes, hard disk speed, number of processes, etc., the utilization rate is used to represent the remaining processing capacity
  1. Stateful and stateless problems:
    1. The processing of a single request by a stateless service does not depend on other requests, that is to say, all the information required to process a strong request is either contained in the request or can be obtained from the outside (such as database), the server itself does not store task information.
    2. Stateful service (stateful service) is the opposite, it will save some data in itself, and the successive requests are related
  1. CDN content distribution network
    1. The full name of CND is Content Delivery Network, that is, content distribution network. The basic idea is to avoid bottlenecks and links on the Internet that may affect the speed and stability of data transmission as much as possible, so as to make content transmission faster and more stable
  1. Persistence technology: ORM (Object Relational Mapping): mapping between objects and relational data
    1. Class: Table of the database
    2. Object: records in the database, row data
    3. Object Properties: Fields
  1. cache
    1. MemCache: It is a high-performance distributed memory object caching system for dynamic web applications to reduce database load. Memcache maintains a unified huge Hash table in memory, which can be used to store data in various formats, including images, videos, files, and database retrieval results.
    2. Redis: It is an open source written in ANSIC language, supports network, can be memory-based and persistent log type, Key-value database, and provides multi-language API
    3. Common cluster slicing methods:
      1. Client sharding: the client corresponds to different servers through the hash value of the Key
      2. Middleware implements sharding: between application software and Redis, such as Codis, etc., middleware implements route assignment from services to background Redis nodes
      3. Client-server collaborative sharding: The client and server collaborate to complete sharding
    1. Distributed storage
      1. Master-slave mode (Master, Slave) mode: one master and multiple slaves, manual switching in case of failure
      2. Sentinel mode (Sentinel): One master and multiple slaves with sentinels, the master node failure automatically selects a new master node
      3. Cluster mode (Cluster): Node-based peer-to-peer cluster, slots, information of different slots is stored in different nodes

Guess you like

Origin blog.csdn.net/qq_25580555/article/details/129669520