Software Engineering | Architectural Design || 软件工程 | 架构设计
Software Engineering | Architectural Design
Introduction: The software needs the architectural design to represents the design of software. IEEE defines architectural design as “the process of defining a collection of hardware and software components and their interfaces to establish the framework for the development of a computer system.” The software that is built for computer-based systems can exhibit one of these many architectural styles.
Each style will describe a system category that consists of :
A set of components(eg: a database, computational modules) that will perform a function required by the system.
The set of connectors will help in coordination, communication, and cooperation between the components.
Conditions that how components can be integrated to form the system.
Semantic models that help the designer to understand the overall properties of the system.
The use of architectural styles is to establish a structure for all the components of the system.
Taxonomy of Architectural styles:
Data centered architectures:
A data store will reside at the center of this architecture and is accessed frequently by the other components that update, add, delete or modify the data present within the store.
The figure illustrates a typical data centered style. The client software access a central repository. Variation of this approach are used to transform the repository into a blackboard when data related to client or data of interest for the client change the notifications to client software.
This data-centered architecture will promote integrability. This means that the existing components can be changed and new client components can be added to the architecture without the permission or concern of other clients.
Data can be passed among clients using blackboard mechanism.
Advantage of Data centered architecture
Repository of data is independent of clients
Client work independent of each other
It may be simple to add additional clients.
Modification can be very easy
img
Data centered architecture
Data flow architectures:
This kind of architecture is used when input data to be transformed into output data through a series of computational manipulative components.
The figure represents pipe-and-filter architecture since it uses both pipe and filter and it has a set of components called filters connected by pipes.
Pipes are used to transmit data from one component to the next.
Each filter will work independently and is designed to take data input of a certain form and produces data output to the next filter of a specified form. The filters don’t require any knowledge of the working of neighboring filters.
If the data flow degenerates into a single line of transforms, then it is termed as batch sequential. This structure accepts the batch of data and then applies a series of sequential components to transform it.
Advantage of Data Flow architecture
It encourages upkeep, repurposing, and modification.
With this design, concurrent execution is supported.
Disadvantage of Data Flow architecture
It frequently degenerates to batch sequential system
Data flow architecture does not allow applications that require greater user engagement.
It is not easy to coordinate two different but related streams
img
Data Flow architecture
Call and Return architectures:
It is used to create a program that is easy to scale and modify. Many sub-styles exist within this category. Two of them are explained below.
Remote procedure call architecture: This components is used to present in a main program or sub program architecture distributed among multiple computers on a network.
Main program or Subprogram architectures: The main program structure decomposes into number of subprograms or function into a control hierarchy. Main program contains number of subprograms that can invoke other components.
program architecture
Object Oriented architecture: The components of a system encapsulate data and the operations that must be applied to manipulate the data. The coordination and communication between the components are established via the message passing.
Characteristics of Object Oriented architecture
Object protect the system’s integrity.
An object is unaware of the depiction of other items.
Advantage of Object Oriented architecture
It enables the designer to separate a challenge into a collection of autonomous objects.
Other objects are aware of the implementation details of the object, allowing changes to be made without having an impact on other objects.
\2. Layered architecture:
A number of different layers are defined with each layer performing a well-defined set of operations. Each layer will do some operations that becomes closer to machine instruction set progressively.
At the outer layer, components will receive the user interface operations and at the inner layers, components will perform the operating system interfacing(communication and coordination with OS)
Intermediate layers to utility services and application software functions.
One common example of this architectural style is OSI-ISO (Open Systems Interconnection-International Organisation for Standardisation) communication system.
软件工程 | 架构设计
2022年12月2日
引言: 软件需要架构设计来体现其设计。IEEE将架构设计定义为“定义一系列硬件和软件组件及其接口的过程,以建立计算机系统开发的框架”。为基于计算机的系统构建的软件可以展示以下众多架构风格之一。
每种风格描述了一个系统类别,包括以下内容:
一组组件(例如:数据库、计算模块),这些组件将执行系统所需的功能。
一组连接器,用于协调、通信和组件之间的协作。
组件如何集成以形成系统的条件。
语义模型,帮助设计者理解系统的整体属性。
架构风格的使用是为了为系统的所有组件建立结构。
架构风格分类:
数据中心架构
在这种架构中,数据存储位于中心位置,其他组件频繁访问该存储以更新、添加、删除或修改其中的数据。
图示展示了典型的数据中心风格。客户端软件访问一个中央存储库。这种做法的变体被用来将存储库转化为黑板,当与客户端相关或客户端感兴趣的数据发生变化时,会向客户端软件发送通知。
这种数据中心架构促进了可集成性。这意味着现有组件可以被更改,新的客户端组件可以被添加到架构中,而无需获得其他客户端的许可或引起他们的关注。
数据可以通过黑板机制在客户端之间传递。
数据中心架构的优势:
数据存储库独立于客户端。
客户端之间独立工作。
添加额外客户端可能较为简单。
修改可能非常容易。
数据流架构
当输入数据需要通过一系列计算操作组件转换为输出数据时,会使用这种架构。
图示展示了管道-过滤器架构,因为它同时使用了管道和过滤器,并且有一组称为过滤器的组件通过管道连接。
管道用于将数据从一个组件传输到下一个组件。
每个过滤器独立工作,设计用于接收特定形式的数据输入,并为下一个过滤器生成指定形式的数据输出。过滤器不需要了解相邻过滤器的工作方式。
如果数据流退化为单行转换,则被称为批处理顺序。这种结构接收一批数据,然后应用一系列顺序组件对其进行转换。
数据流架构的优势:
它鼓励维护、再利用和修改。
这种设计支持并发执行。
数据流架构的劣势:
它经常退化为批处理顺序系统。
数据流架构不允许需要更多用户参与的应用程序。
协调两个不同但相关的数据流并不容易。
调用与返回架构
这种架构用于创建易于扩展和修改的程序。该类别中存在许多子风格,其中两种解释如下:
远程过程调用架构: 该组件用于在分布式网络中的多个计算机上呈现主程序或子程序架构。
主程序或子程序架构: 主程序结构分解为多个子程序或函数,形成控制层次结构。主程序包含多个子程序,这些子程序可以调用其他组件。
面向对象架构
系统的组件封装了数据以及必须应用于数据的操作。组件之间的协调和通信通过消息传递建立。
面向对象架构的特征:
对象保护系统的完整性。
一个对象不知道其他对象的表示方式。
面向对象架构的优势:
它使设计者能够将问题分解为一组独立的对象。
其他对象不知道该对象的实现细节,允许在不影响其他对象的情况下进行更改。
分层架构
定义了多个不同的层次,每个层次执行一组明确定义的操作。每个层次执行的操作逐渐接近机器指令集。
在最外层,组件接收用户界面操作;在最内层,组件执行操作系统接口(与操作系统的通信和协调)。
中间层用于提供实用程序服务和应用程序功能。
这种架构风格的一个常见例子是OSI-ISO(开放式系统互联-国际标准化组织)通信系统。
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· TypeScript + Deepseek 打造卜卦网站:技术与玄学的结合
· 阿里巴巴 QwQ-32B真的超越了 DeepSeek R-1吗?
· 如何调用 DeepSeek 的自然语言处理 API 接口并集成到在线客服系统
· 【译】Visual Studio 中新的强大生产力特性
· 2025年我用 Compose 写了一个 Todo App