当前位置:网站首页>Software architecture design - software architecture style
Software architecture design - software architecture style
2022-04-23 05:48:00 【The green flowers of Wang Li's family】
Software architecture is a structured element with a certain form , A collection of components , Including processing components , Connecting components and data components . The processing component is responsible for processing the data , Data components are processed information , Connecting components combine and connect different parts of the architecture .
characteristic :
1、 A pattern used to describe a particular domain of software architecture ;
2、 Software architecture provides a structure for software system 、 High level abstraction of behaviors and properties ;
3、 Software architecture is a means for project stakeholders to communicate ;
4、 Software architecture is the embodiment of early decision-making ;
5、 Software architecture is a transitive and reusable model ;
6、 Architecture restricts the quality attributes of the system , By studying software architecture, it is possible to predict the quality of software .
One 、 Software architecture modeling
Software architecture modeling is how to represent software architecture , It can be divided into five : Structural model 、 Framework model 、 dynamic model 、 Process model and function model .
Here we mainly summarize “4+1” Model view .“4+1” View model from 5 A different perspective ( Logic 、 process 、 Physics 、 Development 、 scene ) To describe the software architecture .

Logical view : It mainly supports the functional requirements of the system , That is, the services provided by the system to end users .
Development view : Also known as module view , It mainly focuses on the organization and management of software modules . Software can be organized through libraries or subsystems , such , For a software system , It can be developed by different people .
Physical view : Mainly consider how to map software to hardware , It usually takes into account the solution of the system topology 、 System installation 、 Communication, etc .
Process view : Focus on the operating characteristics of the system , Focus on some non functional requirements , For example, the performance and availability of the system . The process view emphasizes concurrency 、 Distribution 、 System integration and fault tolerance , And the main abstract process structure in the logical view . It also defines in which thread the operations of each class in the logical view are executed . The process view can be described as a multi-level abstraction , Each level focuses on different aspects .
scene : It can be regarded as an abstraction of those important system activities , It organically connects the four views , In a sense , Scenario is the most important requirement abstraction . When developing architecture , It can help designers find the components of the architecture and the relationship between them .
Two 、 Software architecture style
PS: The following is too long , Based on understanding , It's OK to know such a thing in practical work .
Please refer to :《 System architecture designer tutorial 》
1、 Data flow style
The data flow style includes batch sequence and pipeline / Filter architecture style .
(1) Batch sequence architecture style . Components are a series of computing units in a fixed order , Components interact only through data transfer . Each processing step is an independent program , Each step must be started after the previous step , The data must be complete , Deliver... In a holistic manner .
(2) The Conduit / Filter architecture style . Each component has a set of inputs and outputs , The component reads the input data stream , After internal treatment , Then the output data stream is generated , After processing , Generate output data stream . This process is usually completed through the transformation of the input stream and incremental calculation , Including enriching data through calculation and adding information , By condensing and deleting refining data , Convert data by changing the recording method , Incrementally convert data, etc . Before the input is fully consumed , The output produces . Here the component is called a filter , The connector is the pipeline for data flow transmission , Pass the output of one filter to the input of another filter .

2. call / Return to style
call / The return style includes the main program / Subroutine architecture style 、 Data abstraction, object-oriented architecture style and hierarchical architecture style
(1) The main program / Subroutine architecture style . Single thread control , Divide the problem into several processing steps , Component is the main program and subroutine . Subroutines can usually be combined into modules . Procedure calls act as an interaction mechanism , That is, it acts as a connector . The calling relationship is hierarchical , Its semantic logic shows that the correctness of the subroutine depends on the correctness of the subroutine it calls .
(2) Data abstraction and object-oriented architecture style . The components of this style are objects . An object is an instance of an abstract data type . In abstract data types , The representation of data and their corresponding operations are encapsulated . The behavior of an object is reflected in its actions of accepting and requesting . Connectors are the way objects interact , Objects interact through function and procedure calls . Objects are encapsulated , Changes to one object do not affect other objects . Objects have states and operations , Also responsible for maintaining the status . This structural style includes encapsulation 、 Interaction 、 polymorphic 、 Integrate 、 Reuse and other features .

(3) Hierarchical architecture style . The hierarchical system is organized into a hierarchical structure . Component implements virtual machine in some layers . Connectors are defined by protocols that determine how layers interact , Topological constraints include constraints on the interaction between adjacent layers . The characteristic of this style is that each layer provides services for the upper layer , Use the next layer of services , You can only see the layer adjacent to yourself . The big problem is decomposed into several progressive small problems , Step by step , It hides a lot of complexity . Modify one layer , Affect up to two layers , And usually only affect the upper layer . The upper level must know the identity of the lower level , You can't adjust the order between levels . It is a common architecture design method , Can effectively simplify the design , Make the designed system structure clear , Easy to improve the ability of reuse and product maintenance . Generally speaking , The architecture of enterprise application system can be divided into The presentation layer 、 There are three layers: the middle layer and the persistence layer .

The presentation layer . The presentation layer is mainly responsible for receiving user requests , Input to users 、 Check and control the output system , Handle some actions of the client , Including control page Jump, etc , And present the final result information to the user . The presentation layer mainly adopts MVC Structure to achieve . The controller is responsible for receiving the user's request , And decide which model should be called to handle ; then , The model calls the middle layer to process the corresponding business logic according to the user's request , And return the data ; Last , The controller calls the corresponding view to format the data returned by the model , And present it to the user through the view .
Middle layer . The middle layer mainly includes business logic layer components 、 Business logic layer workflow 、 Business logic layer entity and business logic layer framework . Business logic layer components are divided into two parts: interface and implementation class , Interfaces are used to define business logic components , Define the methods that business logic components must implement . Business logic components are usually designed according to modules , Each module is designed as a business logic component , And each business logic component is represented by multiple DAO Components as the basis , So as to provide the business logic service of the system externally . Business logic layer workflow can transfer documents between multiple participants according to some predefined rules 、 The process of information or tasks is automated , To achieve a desired business goal , Or promote the achievement of this goal . Business logic layer entities provide state programming access to business data and related functions , Business logic layer entity data can be constructed using data with complex architecture , This data usually comes from multiple related tables in the database , Business logic layer entity data can be used as part of business process I/O Parameter passing , The entities of the business logic layer are serializable , To maintain their current state . Business logic layer is the core component to realize system functions , In the form of containers , Facilitate the development of system functions 、 Code reuse and management .
Persistence layer . The persistence layer is mainly responsible for the persistent storage of data , Mainly responsible for storing business data in files 、 Database and other persistent storage media . The main function of persistence layer is to provide transparent data access for business logic 、 Persistence 、 Loading capacity .
3. Independent component style
Independent component style includes process communication architecture style and event driven architecture style
(1) Process communication architecture style . Components are independent processes , Connectors are messaging . The characteristic of this style is that components are usually named , Messaging can be peer-to-peer 、 Asynchronous and synchronous mode 、 And remote procedure calls
(2) Event driven architecture style . Components do not call a procedure directly , It's about triggering or broadcasting one or more events . Processes in other components of the system are registered in one or more events , When an event is triggered , The system automatically calls all procedures registered in this event . The triggering of an event leads to the call of a procedure in another module . Components in this style are unnamed processes , The connectors that interact between them are often implicit calls between procedures (Implicit Invocation) To achieve . The main advantage of event based implicit invocation style is that it provides strong support for software reuse , It brings convenience to the maintenance and evolution of components , Its disadvantage is that the component gives up the control of system calculation .
4. Virtual machine style
Virtual machine style includes interpreter architecture style and rule-based system style
(1) Interpreter architecture style . An interpreter usually includes an interpretation engine to complete the interpretation work , A storage area containing the code to be interpreted , A data structure that records the current working state of the interpretation engine , And a data structure that records the progress of the interpreted execution of the source code . Software with interpreter style contains a virtual machine , It can simulate the execution process of hardware and some key applications . Its disadvantage is low execution efficiency .
(2) Rules based systems . Rule based systems include rule sets 、 Rule interpreter 、 The rules / Data selector and working inside
save .
5. Warehouse style
Warehouse style includes database architecture style and blackboard architecture style
(1) Database architecture style . Database architecture is the most common form of library style . There are two main categories of components , One is the central shared data source , Save the data status of the current system , The other is multiple independent processing elements , Processing elements operate on data elements .
(2) Blackboard architecture style . Blackboard architecture includes knowledge sources 、 blackboard 、 Control three parts . The knowledge source includes several different units of independent calculation , Provide problem solving knowledge , Knowledge sources respond to changes on the blackboard , Only modify the blackboard . The blackboard is a global database , Contains all the states of the solution domain , It is the only medium for the interaction of knowledge sources . Knowledge source response is controlled by the change of blackboard state . Blackboards are usually used in systems where there is no deterministic algorithm for solving problems , For example, signal processing 、 Problem planning 、 Compiler optimization and other software system design .

版权声明
本文为[The green flowers of Wang Li's family]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204230540317692.html
边栏推荐
- 引航成长·匠心赋能——YonMaster开发者培训领航计划全面开启
- 类的加载与ClassLoader的理解
- MySQL realizes master-slave replication / master-slave synchronization
- opensips(1)——安装opensips详细流程
- 线性规划问题中可行解,基本解和基本可行解有什么区别?
- C language - Spoof shutdown applet
- Differences between sea level anatomy and sea surface height anatomy
- 【华为机试】考试得分总数(如何处理答错的情况?回溯一次,代表答错一题)
- C3P0数据库连接池使用
- JVM系列(4)——内存溢出(OOM)
猜你喜欢

AcWing 836. Merge set (merge set)

mysql实现主从复制/主从同步

‘EddiesObservations‘ object has no attribute ‘filled‘

多线程与高并发(2)——synchronized用法详解

Fletter next generation graphics renderer impaller

多线程与高并发(1)——线程的基本知识(实现,常用方法,状态)

2-软件设计原则

一文读懂当前常用的加密技术体系(对称、非对称、信息摘要、数字签名、数字证书、公钥体系)

2 - principes de conception de logiciels

mysql中duplicate key update
随机推荐
Add days to date
MySQL的锁机制
基于ssm 包包商城系统
io.lettuce.core.RedisCommandExecutionException: ERR wrong number of arguments for ‘auth‘ command
OSI层常用协议
MySQL create Oracle exercise table
AcWing 836. Merge set (merge set)
【华为机试】考试得分总数(如何处理答错的情况?回溯一次,代表答错一题)
solidity合约DOS攻击
类的加载与ClassLoader的理解
Relative reference and absolute reference of Excel
AcWing 1096. Detailed notes of Dungeon Master (3D BFS) code
JSP语法及JSTL标签
数据安全入门产品——数据库审计系统详解
Duplicate key update in MySQL
MDN文档里面入参写法中括号‘[]‘的作用
DBCP使用
Shell instruction learning 1
JDBC工具类封装
Pytorch deep learning practice_ 11 convolutional neural network