Software Architecture (Final Review)

Software Architecture

Introduction to Software Architecture

Software crisis refers to a series of serious problems encountered during the development and maintenance of computer software.

Symptoms of software crisis :

image-20230217101528731

Causes of software crisis :

image-20230217101630026

Basic elements of software engineering : processes, methods, and tools.

Software Engineering Process (Five Activities):image-20230217102300716

Software Engineering Methods (Four Methods):

image-20230217102417928

Software architecture composition (core model) : components + connectors + constraints

Architectural style : A conventional pattern used to describe the organization of systems in a specific application domain, reflecting the structural and semantic properties common to many systems in the domain.

Software framework : A software framework is the skeleton of an application system customized by developers. It is a reusable design of the entire or part of the system. It consists of a set of abstract components and the interaction between component instances.

Design pattern : describes some solutions to common problems in the software system design process. It is usually a widely recognized practice and knowledge summarized from a large number of successful practices.

The relationship between framework and architecture :

  • The architecture is presented as a design specification, while the framework is "half-finished" software.
  • The purpose of architecture is to guide the development of software systems, while the purpose of framework is to design reuse.

The relationship between frameworks and design patterns :

  • The framework gives the architecture of the entire application; while the design pattern gives
    the solution to a single design problem and can be applied in different applications or frameworks.
  • For example: an online game can be developed based on NetEase's Pomelo framework, which is a high-performance, distributed game server framework based on
    Node.js; when implementing a certain animation function,
    the observer mode may be used to implement automated notification updates.
  • The goal of the design pattern is to improve the code structure and improve the structural quality of the program; the framework emphasizes the
    reusability of the design and the scalability of the system to shorten the development cycle and improve the quality of development.

Component : It is a reusable software structural unit with a certain function, representing the main computing elements and data storage in the system.

image-20230217103944052

Component acquisition :

image-20230217110015581

Three schools of components :

  • CORBA: Object Management Group OMG's Common Object Request Broker Architecture CORBA.

    OMG: Object Management Group
    CORBA: Common Object Request Broker Architecture

  • EJB: EJB specification developed by Sun.
    EJB: Enterprise Java Bean

  • DCOM: Distributed Component Object Model DCOM developed by Microsoft.
    DCOM: Distributed Component Object Model

Component management :

  • Component description.
  • Classification and organization of components.
  • Personnel and authority management.

Component description is an abstract description of the essence of the component by the model, which mainly provides the basis for the production and reuse of components. From a management perspective, it is also necessary to describe the component, such as: implementation method, implementation body, comments, producer, production date, size, price, version and associated components. Together with the component model, they form a complete description of the component. describe.

Component classification and organization :

  • Keyword Taxonomy.
  • Facet classification.
  • Hypertext organization method.

Component management: personnel and authority management : including five types of users, namely registered users, public users, component submitters, general system administrators and super system administrators.

Component reuse :

  • Retrieve and extract components.
  • Understand and evaluate components.
  • Modify components.
  • Component assembly.

Component reuse: retrieval and extraction of components :

  • Keyword-based search.
  • Facet search method.
  • Hypertext search method.
  • Other search methods.

Component Reuse: Understanding and Evaluating Components :

  • The function and behavior of the component.
  • Relevant domain knowledge.
  • Adaptability constraints and exceptions.
  • Predictable modifications and modification methods.

Component reuse: component assembly :

  • Function-based assembly technology.
  • Data-based assembly technology.
  • Object-oriented assembly technology.

Connection : It is a way to establish and maintain behavioral associations and information transmission between components.

image-20230217103807133

Connector : represents the interaction between components and realizes the connection between components.

image-20230217103745949

The goals of software architecture : effectiveness, simplicity, reusability, and scalability.

Software architecture modeling

The Kruchten4+1 view model describes the software architecture from 5 different perspectives including logical view, process view, physical view, development view and scene view . Each view only cares about one aspect of the system. Only the combination of five views can reflect the entire content of the system's software architecture.

Logical view : When using object-oriented design methods, the logical view is the object model.

Process view : Describes the concurrency and synchronization aspects of the system's design.

Physical view : Describes the mapping relationship between software and hardware, reflecting the distribution design of the system.

Development view : Describes the static organization of software in the development environment.

image-20230219123048201

Rational 4+1 view model :

image-20230217111915808

use case view

•The use case view contains use cases that describe the behavior of the system as seen by users, analysts, and test engineers.

•The system architecture can be determined based on the view.

•UML:

Static aspect: use case diagram description.

Dynamic aspects: Interaction diagrams, state diagrams and activity diagram descriptions.

design view

•The design view contains the classes, interfaces, and collaboration between classes that build the system.

•Mainly supports the functional requirements of the system, that is, the services the system provides to users.

•UML:

Static aspect: Class diagram, object diagram description.

Dynamic aspects: Interaction diagrams, state diagrams and activity diagram descriptions.

interactive view

•The interaction view describes the flow of control between different parts of the system, including possible concurrency and synchronization mechanisms.

•Mainly solve problems such as system performance, scalability, and throughput.

•UML:

Static aspect: Class diagram, object diagram description.

Dynamic aspects: Interaction diagrams, state diagrams and activity diagram descriptions.

Implementation view

•The implementation view contains the components used to assemble and publish the physical system.

•Mainly solve the configuration management problems of system release.

•UML:

Static aspect: object graph description.

Dynamic aspects: Interaction diagrams, state diagrams and activity diagram descriptions.

Deployment view

•The deployment view contains the nodes that form the system hardware topology.

•Mainly solve the distribution, release and installation issues of the components that make up the physical system.

•UML:

Static aspect: Deployment diagram description.

Dynamic aspects: Interaction diagrams, state diagrams and activity diagram descriptions.

software architecture style

Software architectural style is a conventional pattern that describes the organization of systems in a specific application domain, emphasizing the common organizational structure in software systems.

Architectural style reflects the structural and semantic characteristics common to many systems in the domain, and guides how to effectively organize various modules and subsystems into a complete system.

An architectural style defines a family of systems, that is, an architecture defines a vocabulary and a set of constraints. The vocabulary contains a number of component and connector types, and the set of constraints indicates how the system combines these components and connectors.

Common architectural style classification :

•Data flow styles: batch sequence; pipe/filter.

•Call/return style: main program/subprogram; object-oriented style; hierarchical structure.

•Independent component style: process communication; event system.

•Virtual machine style: interpreter; rule-based system.

•Warehouse style: database system; hypertext system; blackboard system.

The main program-subprogram style is a typical style of structured programming. The system is designed from a functional point of view, and the architecture of the entire system is formed through gradual decomposition and refinement. (applied to C language)

Data abstraction and object-oriented system style (applied to java):

  • A system is viewed as a collection of objects, each with its own set of capabilities.
  • Data and operations on data are encapsulated into abstract data types.
  • It only interacts with the outside world through interfaces, and internal design decisions are encapsulated.

The pipe-and-filter style divides the system task into a number of consecutive processing steps. These steps are connected by the flow of data through the system, and the output of one step is the input of the next step (applied to the video player).

The event system treats the application as a collection of components, and each component does not take action until an event that affects it occurs (applied to program debuggers).

Hierarchy :

  • Hierarchical systems are organized into a hierarchy, with each layer serving the upper layer and acting as a customer of the lower layer. Connectors are defined by protocols that determine how layers interact, and topological constraints include constraints on interactions between adjacent layers.
  • This style supports designs based on adding layers of abstraction. Implementation that allows a complex problem to be decomposed into a sequence of incremental steps. Since each layer only affects two layers at most, and as long as the same interface is provided to adjacent layers, each layer is allowed to be implemented in different methods, which also provides powerful support for software reuse.

Warehouse architecture is a data-centric architecture that is suitable for situations where data is generated by one module and used by other modules.

Client/server architecture is a distributed system model in which a server subsystem provides services to other client subsystems and a client subsystem is responsible for interacting with users.

Three-layer C/S structure :

image-20230217144128813

B/S structure

image-20230219124056705

  • The first layer of presentation layer: mainly completes the interaction between the user and the background and the output function of the final query results.
  • The second logical layer: mainly uses the server to complete the client's application logic functions.
  • The third data layer: mainly performs various operations independently after accepting client requests.

CORBA technical specifications

  • Interface Definition Language (IDL)
  • Interface pool (IR)
  • Dynamic Invocation Interface (DII)
  • Object Adapter (OA)

CORBA architecture model

image-20230219124308868

What is front-end and back-end separation : It is to separate data operation and display . The front-end focuses on data display, displaying the data intuitively through text, pictures or icons. The backend focuses on data operations. The front end sends data to the back end, and the back end modifies the data.

Unified Modeling Language

What is a model : A model is a simplification of reality, and modeling is used to better understand the system.

Introduction to UML :

  • English acronym for Unified Modeling Language.
  • Chinese: Unified Modeling Language.
  • Unified:
  • A standard recognized and followed by all software engineering fields, similar to "English" in natural language.
  • It is simple, intuitive and standardized, and is relatively easy to learn and master. The described software model can be intuitively understood and read, and because it is normative, it can ensure the accuracy and consistency of the model.
  • Modeling:
  • A simplified view used to represent reality to facilitate the design and implementation of object-oriented software systems.
  • Language:
  • UML is mainly a graphical language that follows precise syntax (also includes rules, constraints, and extension mechanisms).

UML syntax and semantics :

image-20230219125734995

The structure of UML

image-20230219125836689

UML things

image-20230219125942264

Structural things

  • Structural thing: A static part of a UML model that describes concepts or physical elements.

  • Structural things are also called: constituent things.

  • Common structural things include:

    ​ Class

    ​Interface

    ​Collaboration

    ​ use case

    ​ Active class (active class)

    Component

    Node

Behavioral things

  • Behavioral Thing: The dynamic part of the UML model diagram that describes behavior across space and time.

  • Common behavioral things include:

    Interaction: A collection of messages between a set of components that implement a certain function, involving messages, action sequences, and links.

    State machine: describes the sequence of states that a thing or interaction goes through in response to events during its life cycle.

group things

  • Group Thing: The organizational part of the UML model diagram, describing the organizational structure of things.

  • Common grouping things include:

    package.

annotate things

  • Annotational thing: The explanation part of the UML model, used to illustrate and explain the elements in the model.

  • Common annotation things include:

    Note.

UML relationships

image-20230219130410019

UML graphics

image-20230219130533867

Class diagram (emphasis)

Interaction diagram (key points)

Sequence diagram (emphasis)

Architecture-based software development

MVC design pattern (key points)

MVC structure :

image-20230219132912599

MVC framework :

image-20230219133018493

MVC communication mechanism

MVP : MVP replaces the Controller in MVC with the Presenter (presentation). The purpose is to completely cut off the connection between the View and the Model, with the Presenter acting as a bridge to completely isolate the communication between View and Model.

image-20230219133218680

MVVM : MVVM takes the idea of ​​"two-way binding of data model data" as its core, so there is no connection between View and Model. The interaction is through ViewModel, and the interaction between Model and ViewModel is two-way, so the data of the view is Changes will modify the data source at the same time, and changes in data source data will be immediately reflected on the View.

image-20230219133246953

Design pattern classification :

image-20230219132703066

The composition of design patterns :

  • Schema name
  • question
  • solution
  • as a result of

Classification of middleware

  • Underlying middleware: JVM (Java Virtual Machine, Java virtual machine), CLR (Common Language Runtime, common language runtime), ACE (Adaptive Communication Environment, adaptive communication environment), etc.
  • General-purpose middleware: also called platform, its mainstream technologies mainly include RPC, ORB, MOM (Message-Oriented Middleware, message-oriented middleware), etc.
  • Integrated middleware: WorkFlow, EAI, etc.

Main middleware technologies :

  • remote procedure call
  • remote method call
  • object request proxy
  • Message-oriented middleware
  • Transaction Monitor

Main categories of software process models :

  • waterfall model
  • prototyping model
  • iterative development
  • convertible model

6806166733)]

The composition of design patterns :

  • Schema name
  • question
  • solution
  • as a result of

Classification of middleware

  • Underlying middleware: JVM (Java Virtual Machine, Java virtual machine), CLR (Common Language Runtime, common language runtime), ACE (Adaptive Communication Environment, adaptive communication environment), etc.
  • General-purpose middleware: also called platform, its mainstream technologies mainly include RPC, ORB, MOM (Message-Oriented Middleware, message-oriented middleware), etc.
  • Integrated middleware: WorkFlow, EAI, etc.

Main middleware technologies :

  • remote procedure call
  • remote method call
  • object request proxy
  • Message-oriented middleware
  • Transaction Monitor

Main categories of software process models :

  • waterfall model
  • prototyping model
  • iterative development
  • convertible model

Design questions involve software process model analysis

Guess you like

Origin blog.csdn.net/qq_57109165/article/details/129113631